zatvorgt 5 Posted January 29, 2019 Share Posted January 29, 2019 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) Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/ Share on other sites More sharing options...
Marsbar 228 Posted January 29, 2019 Share Posted January 29, 2019 Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51205 Share on other sites More sharing options...
zatvorgt 5 Posted January 29, 2019 Author Share Posted January 29, 2019 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))) Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51206 Share on other sites More sharing options...
Mykoplazma 24 Posted January 29, 2019 Share Posted January 29, 2019 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/ ) Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51207 Share on other sites More sharing options...
zatvorgt 5 Posted January 29, 2019 Author Share Posted January 29, 2019 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? Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51208 Share on other sites More sharing options...
Mykoplazma 24 Posted January 30, 2019 Share Posted January 30, 2019 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. Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51213 Share on other sites More sharing options...
zatvorgt 5 Posted January 30, 2019 Author Share Posted January 30, 2019 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 Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51219 Share on other sites More sharing options...
Mykoplazma 24 Posted January 30, 2019 Share Posted January 30, 2019 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; Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51220 Share on other sites More sharing options...
zatvorgt 5 Posted January 30, 2019 Author Share Posted January 30, 2019 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.... Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51227 Share on other sites More sharing options...
Mykoplazma 24 Posted January 30, 2019 Share Posted January 30, 2019 add one more end on the end Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51228 Share on other sites More sharing options...
zatvorgt 5 Posted January 30, 2019 Author Share Posted January 30, 2019 16 minutes ago, Mykoplazma said: add one more end on the end yohooooooooooooo!!!! this work , thanks for all , big thanks for you!!!!very big Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51229 Share on other sites More sharing options...
Zan 99 Posted January 30, 2019 Share Posted January 30, 2019 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; Link to comment https://wrobot.eu/forums/topic/10735-destroy-item-vanilla-xml-fight-class/#findComment-51230 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now