gbcsi88 Posted September 5, 2018 Share Posted September 5, 2018 hello all i can not speak english well, please understand i want a gold consumption script per secondused for concentration spell.. i can not make it out of my ability i very want it. please... Link to comment Share on other sites More sharing options...
SeraphimKensai Posted September 5, 2018 Share Posted September 5, 2018 Not sure what you have as of yet but to remove an item like gold you would do something like... Define a MiscItem property to reference the gold item. Event OneffectstartTargetref.RemoveItem GoldProperty 1EndEvent I'm not sure if that will continuously drain gold as you hold it, so you might need a different event, but that's in a rudimentary version something close to what I imagine you're looking for. Link to comment Share on other sites More sharing options...
gbcsi88 Posted September 5, 2018 Author Share Posted September 5, 2018 i applied it but failed.. Link to comment Share on other sites More sharing options...
SeraphimKensai Posted September 5, 2018 Share Posted September 5, 2018 Post what you have of your script so far and I'll take a look at it. Link to comment Share on other sites More sharing options...
gbcsi88 Posted September 5, 2018 Author Share Posted September 5, 2018 fire and forget spell script tried applying it to concentration spells, but only gold was consumed during the first cast..Because Google translation is crappy english :( Event OnEffectStart(actor Target, actor Caster) if Game.Getplayer().GetitemCount(gold001) <= 1 Game.Getplayer().Unequipspell(Myspell, 0)Game.Getplayer().Unequipspell(Myspell, 1)Debug.Notification("no Gold")endifendEvent if akSpell == Myspellif Game.Getplayer().GetitemCount(Gold001) > 1Game.Getplayer().Removeitem(Gold001, 1, ture)elseGame.Getplayer().removeitem(Gold001, 1, ture)Game.Getplayer().UnequipSpell(Myspell, 0)Game.Getplayer().UnequipSpell(Myspell, 1)Debug.Notification(:no Gold")endifendifendEvent Link to comment Share on other sites More sharing options...
curecuriosity Posted September 5, 2018 Share Posted September 5, 2018 Does the magic effect start immediately? If so can you use something like this?if (Game.Getplayer().HasMagicEffect(MagicEffectProp)Game.Getplayer().RemoveItem(GoldProp, 1, true)utility.wait(1.0)endifThat should work if the script loops. utility.wait changes with framerate though, so using realtime might be better. Link to comment Share on other sites More sharing options...
gbcsi88 Posted September 6, 2018 Author Share Posted September 6, 2018 missing EOF at 'if'no output generated for Goldcostsetspell, compilation failed fail... :sad: scriptname Goldcostsetspell miscObject property Gold001 Auto MagicEffect property SetEffect Auto if Game.Getplayer().HasMagicEffect(SetEffect)Game.Getplayer().removeitem(Gold001, 1, ture)utility.wait(1.0 endif Link to comment Share on other sites More sharing options...
SeraphimKensai Posted September 6, 2018 Share Posted September 6, 2018 The utility wait you just posted isn't enclosed, that could be causing issues with compiling. Link to comment Share on other sites More sharing options...
curecuriosity Posted September 6, 2018 Share Posted September 6, 2018 Also make sure you run it inside an event or function. The compiler should also give you the line number for the fail. I think it says line 3, 5 or something like that. If the statement isn't inside an event or function and the rest of the script is correct, the script will fail instantly and give back EOF error. Link to comment Share on other sites More sharing options...
gbcsi88 Posted September 6, 2018 Author Share Posted September 6, 2018 i do not get what it means.. Google translation f*#@... i do not know the script, and the above script was done by someone else. sorry Link to comment Share on other sites More sharing options...
Recommended Posts