PDA

View Full Version : Eluna Transmogrification



Rochet2
09-07-2013, 10:51 AM
Converted my transmogrification to eluna :)
Its the earlier version, not the latest due to the latest using DBC files.

The script is rather plug and play.
You just need to set your NPC's entry to the top of the script: local NPC_Entry = 100

Everything else is handled automatically (DB table creation .. etc)
There are a few settings in the script at the top.
There is also a possibility to create some translations if you want to. You just need to replace the nil with a string in the locale table or slotname table in the right spot.
The locale order is the same as in TC DB: http://collab.kpsn.org/display/tc/Localization+lang

https://github.com/ElunaLuaEngine/Scripts/blob/master/Custom/Transmogrifier.lua

Mathias
09-07-2013, 12:56 PM
Nice one!!

Etox
09-07-2013, 01:44 PM
scripts\transmog.lua:131: attempt to call method 'GetDbLocaleIndex' <a nil value>

Rochet2
09-07-2013, 01:58 PM
scripts\transmog.lua:131: attempt to call method 'GetDbLocaleIndex' <a nil value>

I added a few new methods while creating it. You need to update your source to get the new methods.

_Ikester_
09-07-2013, 07:05 PM
Nice work man :)

Tommy
09-07-2013, 07:17 PM
Glad to see Eluna being used on a project like this. ^.^

Etox
09-07-2013, 11:23 PM
I added a few new methods while creating it. You need to update your source to get the new methods.

Getting same errors after I updated my source

Tommy
09-07-2013, 11:38 PM
Getting same errors after I updated my source

Are you sure you recompiled? You might want to rerun CMake and then rebuild.

Foereaper
09-08-2013, 08:15 AM
Tested on latest revision, works perfectly fine

Skrbx
09-08-2013, 08:59 AM
Very Nice!

Mathias
10-04-2013, 11:17 AM
For some reasons you cant transmog custom items

Rochet2
10-04-2013, 11:22 AM
For some reasons you cant transmog custom items

Last time I looked into someone's custom item problem, the item was made badly and was not blizzlike or similar.
This caused some check(s) to fail and thus you could not use it.
Check that the item is ok

Mathias
10-04-2013, 12:01 PM
The custom item is just a copy past of an blizzlike item just with some boosts in stats and new entery id

- - - Updated - - -


REPLACE INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `WDBVerified`) VALUES (90010, 2, 7, -1, 'Bloodsurge V', 64531, 6, 0, 0, 1, 0, 200000, 13, -1, -1, 80, 80, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 7, 350, 4, 400, 38, 350, 0, 0, 0, 0, 31, 400, 44, 350, 0, 0, 0, 0, 0, 0, 0, 0, 2500, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 'Forgotten-WoW', 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'internalitemhanler', 0, 0, 0, 0, 0, 1);

This is a sql query for one of em this is a weapon

Foereaper
10-04-2013, 03:07 PM
Custom items work fine for me

Mathias
10-04-2013, 03:38 PM
Try to import that item and see if it works with it :S

RuneCodez
10-09-2013, 01:16 AM
Is this script special in any way? Does it work like the other transmo scripts?
Other scripts I've used has required me to make custom items with the display id of how I want the item to look like, and the stats for the item I want transmoed.
Is this script just like that?

Rochet2
10-09-2013, 10:43 AM
Basically yes. This script works around like how it works on retail.

How would you want one too work?
I made one c++ script earlier that showed all displays from items in database.
I guess one with displays from dbc or just predefined table could be done.

This script was made like this since I wanted it to be blizzlike and since other scripts usually had predefined displays.

Russakk
10-10-2013, 04:23 PM
My didnt transmogrification didnt work. what i have to do?
http://img853.imageshack.us/img853/9350/cgom.png

Rochet2
10-10-2013, 05:38 PM
My didnt transmogrification didnt work. what i have to do?
http://img853.imageshack.us/img853/9350/cgom.png

You need to have items you can use and that are similar to the ones you have equipped in your bags.

Russakk
10-10-2013, 05:57 PM
i have items in my bag,
look : http://img513.imageshack.us/img513/4686/n6uf.png

Russakk
10-10-2013, 08:13 PM
It works now, but its works only with English Client. How to set this too for an other Client Language?

Rochet2
10-11-2013, 12:05 PM
At the top of the script you should see the english texts. After them are the translations. Atm they are nil. The translation order for the languages is the same as in tc database. (for example locales_gossip_menu_option)

syaoraner
10-13-2013, 06:28 AM
Nice job!!!

YoungBoyd
03-04-2014, 10:14 AM
i get error at line 481

Rochet2
03-04-2014, 12:41 PM
i get error at line 481


ok i have the transmog lua script for eluna i have lasest eluna core but i get error

Eluna Nova::Error loading 'scripts\transmog.lua'.
scripts\transmog.lua:481: attempt to call global 'RegisterPlayerEvent'(a nil value)

Are you sure you have latest?
Loads fine for me on latest:

TC>TrinityCore rev. 0aea16f61907+ 2014-03-01 10:57:01 +0200 (master branch) (Win
32, Debug) (worldserver-daemon) ready...
reload eluna
[Eluna]: Restarting Lua Engine
[Eluna]: Lua Engine loaded.
[Eluna]: Load File: lua_scripts\boop.lua
[Eluna]: Load File: lua_scripts\Transmog.lua
Deleting non-existing transmogrification entries...
[Eluna]: Loaded 2 Lua scripts..
TC>

Made up an error:

TC> reload eluna
[Eluna]: Restarting Lua Engine
[Eluna]: Lua Engine loaded.
[Eluna]: Load File: lua_scripts\boop.lua
[Eluna]: Load File: lua_scripts\Transmog.lua
Deleting non-existing transmogrification entries...
[Eluna]: Error loading file `lua_scripts\Transmog.lua`.
lua_scripts\Transmog.lua:482: attempt to call global 'RegisterPlayserEvent' (a n
il value)
[Eluna]: Loaded 2 Lua scripts..
TC>

Note that on latest the error message is different, which would indicate that your version is old.

Foereaper
03-04-2014, 04:13 PM
Yeah, you definitely can't have the latest version, the nova suffix was removed a year ago

slp13at420
03-05-2014, 04:54 PM
Cant transmogrify:
rediculus items -- Foereaper: would be fun to stab people with a fish
-- Cant think of any good way to handle this easily

rofl but I wanna fish-punch someone for 5m damage :rofl2::rofl:

Rochet2
03-05-2014, 05:00 PM
rofl but I wanna fish-punch someone for 5m damage :rofl2::rofl:

I was thinking of adding a limitation at some point for that :P
I could rip the items that are not allowed from cata DB :3

shotsofdeath98
03-06-2014, 11:58 PM
could you update this please?
I did a few things already to fix it up but it still doesn't work ingame.
The buttons work and it says its added, but its not added, no visual effect.
http://pastebin.com/6EhfQwq5

Rochet2
03-07-2014, 10:52 AM
could you update this please?
I did a few things already to fix it up but it still doesn't work ingame.
The buttons work and it says its added, but its not added, no visual effect.
http://pastebin.com/6EhfQwq5

There is an update problem that was there since the beginning, you might be hitting it.
The problem is that an update should be sent to the player(s) when the visual is changed, but one is not sent, so the effect is not instant, but is there.

The script posted on the main post works fine on latest eluna:
142
http://emudevs.com/attachment.php?attachmentid=142&d=1394189567

shotsofdeath98
03-07-2014, 01:27 PM
There is an update problem that was there since the beginning, you might be hitting it.
The problem is that an update should be sent to the player(s) when the visual is changed, but one is not sent, so the effect is not instant, but is there.

The script posted on the main post works fine on latest eluna:
142
http://emudevs.com/attachment.php?attachmentid=142&d=1394189567

alright, ill try it out, was hoping it was instant, ill work in it today see if i can get it instant :)

---
EDIT
it updates after the game is refreshed... aka /reload

Rochet2
03-07-2014, 02:23 PM
alright, ill try it out, was hoping it was instant, ill work in it today see if i can get it instant :)

---
EDIT
it updates after the game is refreshed... aka /reload

I made a change locally for the C++ version.
Unfortunately the functions are not available for lua and I havent added the change to the public distribution as I dont even know how I would go about testing it.

The function would be either
pItem2->SendUpdateToPlayer(player);
or
pItem->SetState(ITEM_CHANGED, player);

joyjoy
05-08-2014, 01:31 PM
i found the Suit effect lost while transmogrifications works,how to fix it?If the lua change the equipment Suit effect?

Rochet2
05-08-2014, 01:35 PM
i found the Suit effect lost while transmogrifications works,how to fix it?If the lua change the equipment Suit effect?

If you are talking about the Set bonuses, it is a purely visual bug. The stats are not lost.
The bug can not be fixed in a good way without client patches.

Noven
06-25-2014, 11:29 AM
How do I edit it, so for example, plate users can transmog into cloth and so on?

Rochet2
06-25-2014, 11:40 AM
How do I edit it, so for example, plate users can transmog into cloth and so on?

You would need to edit the massive IF check that the bottom of SuitableForTransmogrification function.
I suggest you take a look at how the C++ transmogrification script does it. On the latest version it is blizzlike and much cleaner.
it also has the AllowMixedArmor setting in it that allows use of mail and plate etc mixed, so you see from there how and where. The function name should be same in the C++

Noven
06-25-2014, 11:57 AM
Okay, thanks, appreciate the help!

Tunes
07-02-2014, 10:14 AM
Hello Rochet2,

I want to thank you for your hard work on this script.
It works like it suppose to be!

Keep the good work up!

OMGhixD
07-27-2014, 12:43 AM
Would you be able to add Arena Rating Required? :o <3

OMGhixD
08-06-2014, 02:47 AM
[BUG] For some reason "Set Bonus from set's like Season 2" are being removed when transmogged.

Rochet2
08-06-2014, 06:07 AM
[BUG] For some reason "Set Bonus from set's like Season 2" are being removed when transmogged.


If you are talking about the Set bonuses, it is a purely visual bug. The stats are not lost.
The bug can not be fixed in a good way without client patches.

asd

OMGhixD
08-09-2014, 06:29 PM
asd

aaaaa that explains it!

OMGhixD
08-18-2014, 03:55 PM
New bug found Reported by my players : When you repair your gear, the transmogs to that gear will be gone, so I lost all my transmogs after repairing...

Confirmed

Ladrek
11-20-2014, 08:02 AM
this is giving me this error whats up with that?
362

Rochet2
11-20-2014, 05:24 PM
this is giving me this error whats up with that?
362

Try now. Some base behavior was changed some months ago and the script was not updated.

Kozchu
12-02-2014, 08:19 PM
Does that script still works?

I have create a npc with entry 100000, and on the top of the script local NPC_Entry = 100000 but i cant speak to my npc, is that normal?

Salja
12-02-2014, 08:44 PM
Does that script still works?

I have create a npc with entry 100000, and on the top of the script local NPC_Entry = 100000 but i cant speak to my npc, is that normal?

The npc must set npcflag 1 in database for gossip option

Kozchu
12-02-2014, 09:41 PM
Yea it works i have the menu, my bad i modifed the bad column.

But when I try to transmo nothing happens :s

I have this error : lua_scripts/transmo.lua:382: calling 'GetOwnerGUID' on bad self (Item expected, got pointer to nonexisting (invalidated) object (userdata). Check your code.)

Rochet2
12-02-2014, 10:00 PM
The code needs to be updated to the new changes that dont allow saving objects over time.
Heads up: Many users will likely hit this error as well.

Corrected, try now.
Noticed we should implement a new method.

Kozchu
12-02-2014, 10:35 PM
Yea, it works, good job

mariow
01-02-2015, 07:06 PM
nice !!

Rochet2
09-12-2015, 08:11 PM
Script updated to work with classic, tbc and wotlk.
Some logic fixes were made and some of the code was made clearer.

susumakusu
01-12-2016, 11:39 PM
Hello Rochet, I ve installed the Transmogrifier script in the latest Eluna Woltk Core, and I can't use it, I dont know if it is broken or is my fault, I create the npc with flag 1 for gossips, I buy a normal sword and get some axes, dages and swords, but I can only see update menu and when I click it doesn't work.


https://gyazo.com/21339650e38d4bd68e17dd42c1d42d05.png (https://gyazo.com/21339650e38d4bd68e17dd42c1d42d05.png)


https://gyazo.com/ae2598da8ed5c3973691c565700473f0.png (https://gyazo.com/ae2598da8ed5c3973691c565700473f0.png)

PD: I have the client in French.

PD2: My eluna run perfectly with other scripts. And in server console there is no errors.

Rochet2
01-13-2016, 12:06 AM
Hello Rochet, I ve installed the Transmogrifier script in the latest Eluna Woltk Core, and I can't use it, I dont know if it is broken or is my fault, I create the npc with flag 1 for gossips, I buy a normal sword and get some axes, dages and swords, but I can only see update menu and when I click it doesn't work.


https://gyazo.com/21339650e38d4bd68e17dd42c1d42d05.png (https://gyazo.com/21339650e38d4bd68e17dd42c1d42d05.png)


https://gyazo.com/ae2598da8ed5c3973691c565700473f0.png (https://gyazo.com/ae2598da8ed5c3973691c565700473f0.png)

PD: I have the client in French.

PD2: My eluna run perfectly with other scripts. And in server console there is no errors.

Do you use trinity?
Try adding

print(slotName, slot, player:GetDbcLocale())
after

local slotName = GetSlotName(slot, player:GetDbcLocale())

and report back what it prints.
If it doesnt print when you try to use the script, then either you dont have any items equipped or the equipped item quality is not allowed (shouldnt happen with your settings though)

susumakusu
01-13-2016, 12:31 PM
Do you use trinity?
Try adding

after


and report back what it prints.
If it doesnt print when you try to use the script, then either you dont have any items equipped or the equipped item quality is not allowed (shouldnt happen with your settings though)

Thanks for the answer, Yes i am using Trinity Core

Here you are ---> https://gyazo.com/652b3b81d26f263b0afc223b2b0e6252

I click on update menu and nothing happen.

Rochet2
01-13-2016, 01:40 PM
Thanks for the answer, Yes i am using Trinity Core

Here you are ---> https://gyazo.com/652b3b81d26f263b0afc223b2b0e6252

I click on update menu and nothing happen.

I fixed the issue.
The issue was that the slot names did not default to english, but tried instead using whatever locale requested even if the slot name for it was nil.

susumakusu
01-13-2016, 01:50 PM
Thank you.

BuxBunny
06-14-2016, 08:25 AM
Hello,
does anyone have the NPC sql template for this ? I can't seem to get it right

INSERT INTO `creature_template` (`entry`,`difficulty_entry_1`,`difficulty_entry_2` ,`difficulty_entry_3`,`KillCredit1`,`KillCredit2`, `modelid1`,`modelid2`,`modelid3`,`modelid4`,`name` ,`subname`,`IconName`,`gossip_menu_id`,`minlevel`, `maxlevel`,`exp`,`faction`,`npcflag`,`speed_walk`, `speed_run`,`scale`,`rank`,`dmgschool`,`BaseAttack Time`,`RangeAttackTime`,`BaseVariance`,`RangeVaria nce`,`unit_class`,`unit_flags`,`unit_flags2`,`dyna micflags`,`family`,`trainer_type`,`trainer_spell`, `trainer_class`,`trainer_race`,`type`,`type_flags` ,`lootid`,`pickpocketloot`,`skinloot`,`resistance1 `,`resistance2`,`resistance3`,`resistance4`,`resis tance5`,`resistance6`,`spell1`,`spell2`,`spell3`,` spell4`,`spell5`,`spell6`,`spell7`,`spell8`,`PetSp ellDataId`,`VehicleId`,`mingold`,`maxgold`,`AIName `,`MovementType`,`InhabitType`,`HoverHeight`,`Heal thModifier`,`ManaModifier`,`ArmorModifier`,`Damage Modifier`,`ExperienceModifier`,`RacialLeader`,`mov ementId`,`RegenHealth`,`mechanic_immune_mask`,`fla gs_extra`,`ScriptName`,`VerifiedBuild`) VALUES('69000','0','0','0','0','0','7993','0','0', '0','Transmogrification','','','0','80','80','0',' 35','1','1','1.14286','1','3','0','2000','2200','1 ','1','0','0','0','0','0','0','0','0','0','0','0', '0','0','0','0','0','0','0','0','0','0','0','0','0 ','0','0','0','0','0','0','0','0','None','0','3',' 1','69','69','0','0','1','0','0','1','0','0','','0 ');

Minodevs
07-20-2016, 08:35 AM
Thanks rochet :)