I am having some issues with a script from my eAthena server. I think some things have changed with rAthena that are causing this issue but I am not sure what those are so here is the problem. Whenever I try to use an item which calls a specific script my map server displays the following errors:
[Warning]: Unable to restore stack! Double continuation!
[Debug]: Previous script (lost):
[Debug]: Source (NPC): FAKE_NPC (invisible/not on a map)
[Debug]: Current script:
[Debug]: Source (NPC): summonscript (invisible/not on a map)
Here is how I am calling the script from the item's script field:
getitem 57000,1; set $@homunsummoned,2; set $@summoner,getcharid(3); donpcevent "summonscript::OnItemSummonGlobal";
The item is consumed so I am first giving them the item back. I am then setting a character variable storing the homunculus summoned as well as setting one which stores the accountid of the character that used the item. Next I call the OnItemSummonGlobal function of my summonscript. Here is the code for that below:
- script summonscript -1,{
OnItemSummonGlobal:
attachrid($@summoner);
if (class != 18 || class != 4017) goto beginsummon;
if (class == 18) && (class == 4017) goto arealch;
beginsummon:
mes "[Equivilant Trade]";
mes "The summoning prossess is now begining, you will need one Seed of Life, and one Dew of Yggdrasil. Once those itmes are supplied you may begin.";
mes "Do you have these items?";
if (countitem(7140) < 1 || countitem(7141) < 1) { mes "You have not one or more of the items required. Please go and get them then try once more.";
close; }
mes "You may now begin.";
set @fail,rand(1,100);
//Chimera prossessing
//10%
if (failprecent == 0) { if (@fail == 10) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 10%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//20%
if (failprecent == 1) { if (@fail <= 10 || @fail == 20) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 20%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//30%
if (failprecent == 2) { if (@fail <= 20 || @fail == 30 ) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 30%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//40%
if (failprecent == 3) { if (@fail <= 30 || @fail == 40 ) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 40%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//50%
if (failprecent == 4) { if (@fail <= 40 || @fail == 50 ) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 50%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//60%
if (failprecent == 5) { if (@fail <= 50 || @fail == 60) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 60%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//70%
if (failprecent == 6) { if (@fail <= 60 || @fail == 70) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 70%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//80%
if (failprecent == 7) { if (@fail <= 70 || @fail == 80) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 80%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//90%
if (failprecent == 8) { if (@fail <= 80 || @fail == 90) { atcommand @monsterbig +"Chimera";
mes "Your Failure Rate is now at 90%.";
set failprecent,failprecent + 1;
goto removeItems;
close;
}}
//100%
if (failprecent == 9) { if (@fail <= 100) { atcommand @monsterbig +"Chimera";
mes "Your Failure rate is now at 100%, this means you will spawn a Chimera at any time you try to summon. Please visit Hoenheim for help.";
goto removeItems;
close;
}}
//Homunc prossessing
if ($@homunsummoned == 1) { atcommand @summon +"6001";
goto removeItems;
close;
}
if ($@homunsummoned == 2) { atcommand @summon +"6002";
goto removeItems;
close;
}
if ($@homunsummoned == 3) { atcommand @summon +"6003";
goto removeItems;
close;
}
if ($@homunsummoned == 4) { atcommand @summon +"6004";
goto removeItems;
close;
}
if ($@homunsummoned == 5) { atcommand @summon +"6005";
goto removeItems;
close;
}
if ($@homunsummoned == 6) { atcommand @summon +"6006";
goto removeItems;
close;
}
if ($@homunsummoned == 7) { atcommand @summon +"6007";
goto removeItems;
close;
}
if ($@homunsummoned == 8) { atcommand @summon +"6008";
goto removeItems;
close;
}
if ($@homunsummoned == 9) { atcommand @summon +"6009";
goto removeItems;
close;
}
if ($@homunsummoned == 10) { atcommand @summon +"6010";
goto removeItems;
close;
}
if ($@homunsummoned == 11) { atcommand @summon +"6011";
goto removeItems;
close;
}
if ($@homunsummoned == 12) { atcommand @summon +"6012";
goto removeItems;
close;
}
if ($@homunsummoned == 13) { atcommand @summon +"6013";
goto removeItems;
close;
}
if ($@homunsummoned == 14) { atcommand @summon +"6014";
goto removeItems;
close;
}
if ($@homunsummoned == 15) { atcommand @summon +"6015";
goto removeItems;
close;
}
if ($@homunsummoned == 16) { atcommand @summon +"6016";
goto removeItems;
close;
}
removeItems:
delitem 7140,1;
delitem 7141,1;
arealch:
mes "You are a Creator or Alchemist, therefore you can not use this. This is for Non-Alchemist tree individuals who do not know Alchemy.";
close;
This npc is nested within the npc file of a visible NPC in case that is important to know.
Question
Geowil
I am having some issues with a script from my eAthena server. I think some things have changed with rAthena that are causing this issue but I am not sure what those are so here is the problem. Whenever I try to use an item which calls a specific script my map server displays the following errors:
Here is how I am calling the script from the item's script field:
The item is consumed so I am first giving them the item back. I am then setting a character variable storing the homunculus summoned as well as setting one which stores the accountid of the character that used the item. Next I call the OnItemSummonGlobal function of my summonscript. Here is the code for that below:
This npc is nested within the npc file of a visible NPC in case that is important to know.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.