January 29, 20197 yr Hello all , exist simple lua or cs # code to destroy item with count more then 2 in vanilla? example need to destroy more then 5 soulshards in xml fight class.....( is not spell is c# code)
January 29, 20197 yr Author 18 minutes ago, Marsbar said: thanks , i read this ....but i low in programming .... how to realizate this for run in xml profile? exist code cpecial changed for soulshards ? and where i need to past this code.....sorry my bad english......i past in (is not spell - is CS # but i have the errors.. Maybe you have fightclass.xml file with work this function?biiiiig thanks for this)))
January 29, 20197 yr Look for macro in lua on forums put the macro in the lua script section in xml rotation. ( like that https://forum.elysium-project.org/topic/35846-auto-delete-soul-shard-script-macro/ )
January 29, 20197 yr Author 17 minutes ago, Mykoplazma said: Look for macro in lua on forums put the macro in the lua script section in xml rotation. ( like that https://forum.elysium-project.org/topic/35846-auto-delete-soul-shard-script-macro/ ) for this need addon super macro..... exist clean code without this addon?
January 30, 20197 yr You can add a lua script to spell condition and it will be executed each time when the spell is executed. Search for Lua in [add condition] menu in fight class editor.
January 30, 20197 yr Author 3 hours ago, Mykoplazma said: Вы можете добавить скрипт lua в состояние заклинания, и он будет выполняться каждый раз, когда заклинание выполнено. Найдите Lua в меню [добавить условие] в редакторе классов боя. big thanks , but i search code without addons supermacro.... all macro need to instal this addon..... but i need clear code lua or cs# to add in xml fightclass without addons
January 30, 20197 yr Supermacro is and addon to extend macro lenght - and only that. Maybe that function thing. But that is not important. Try to put that in lua part: number = 5; i=1; for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"Soul Shard") then if i > number then PickupContainerItem(bag,slot); DeleteCursorItem(); end; i=i+1; end; end;
January 30, 20197 yr Author 2 hours ago, Mykoplazma said: Supermacro is and addon to extend macro lenght - and only that. Maybe that function thing. But that is not important. Try to put that in lua part: number = 5; i=1; for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"Soul Shard") then if i > number then PickupContainerItem(bag,slot); DeleteCursorItem(); end; i=i+1; end; end; for test i use delete "Mace" ....server elysuim , kronos number = 5; i=1; for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"Mace") then if i > number then PickupContainerItem(bag,slot); DeleteCursorItem(); end; i=i+1; end; end; and dont do nothing/ have lua error window - 'end' expected(to close 'for' at line 8)near '<eof>' or maybe exist cs# plugin for this? if lua is hard....
January 30, 20197 yr Author 16 minutes ago, Mykoplazma said: add one more end on the end yohooooooooooooo!!!! this work , thanks for all , big thanks for you!!!!very big
January 30, 20197 yr number = 5; i=1; for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"Soul Shard") then if i > number then PickupContainerItem(bag,slot); DeleteCursorItem(); end; end; i=i+1; end; end;
Create an account or sign in to comment