Charmy
05-13-2004, 06:03 PM
When i load this script and hand in anything but 100pp zone.exe crashes. any ideas on why? i have a feeling its in
if(($myplatinum = 100) && ($mygold = 0) && ($mysilver = 0) && ($mycopper = 0))
sub EVENT_SAY
{
if($mname=~ /^Soulbinder/i)
{
if($text=~/Hail/i)
{
quest::say("Greetings $name. When a hero of our world is slain their soul returns to the place it was last bound and the body is reincarnated. As a member of the Order of Eternity it is my duty to [bind your soul] to this location if that is your wish. If you are an adventurer and are in need of a heal, perhaps you could help to fill my coin purse in exchange for heal? Nothing to extreme just give me a [Healing emblem] and i shall heall all your wounds.");
}
if($text=~/bind my soul/i)
{
quest::say("Binding your soul. You will return here when you die.");
quest::castspell($userid,2049);
}
if($text=~/Healing Emblem/i)
{
quest::say("Yes, yes a healing emblem, don't have have one? well.. for a small fee i can give you one, nothing to much, lets say 100pp per emblem, only in platinum please? No? well fine you can make the trip to the nexus then, our leader resides there he sells the emblems, go buy one from him, otherwise you have to pay my price.")
}
}
}
sub EVENT_ITEM
{
if($mname=~ /^Soulbinder/i)
{
if($itemcount{18700} && $itemcount{18700} == 1)
##changed item to tome of discord incase anyone wants to try it on their server to try to debug.
{
quest::say("A Healing Emblem? Very well got one heal comming your way!");
quest::castspell($userid,13);
}
$myplatinum = ($platinum);
$mygold = ($gold);
$mysilver = ($silver);
$mycopper = ($copper);
if(($myplatinum = 100) && ($mygold = 0) && ($mysilver = 0) && ($mycopper = 0))
{
quest::say("Very good, here you are, One Healing Emblem, just hand it back to me when you
are in need of a heal");
quest::summonitem(18700,1);
}
else
{
quest::say("I said 100 platinum, in Platinum coins only, Here take back your money");
quest::givecash($mycopper,$mysilver,$mygold,$mypla tinum);
}
}
}
Handing him 100 pp results in the item, and handing the item results in a CH, this part works. but if i hand in any other coin combo it should say no and hand back the money, but zone is crashing, just wondering if anyone has any ideas on why its crashing, and secondly , i used the new may 12th code and the EVENT_ITEM section of this script didn't work in anyway, the text did but handing in any items didn't result in anything, any ideas on this as well? Thanks all for the help =)
if(($myplatinum = 100) && ($mygold = 0) && ($mysilver = 0) && ($mycopper = 0))
sub EVENT_SAY
{
if($mname=~ /^Soulbinder/i)
{
if($text=~/Hail/i)
{
quest::say("Greetings $name. When a hero of our world is slain their soul returns to the place it was last bound and the body is reincarnated. As a member of the Order of Eternity it is my duty to [bind your soul] to this location if that is your wish. If you are an adventurer and are in need of a heal, perhaps you could help to fill my coin purse in exchange for heal? Nothing to extreme just give me a [Healing emblem] and i shall heall all your wounds.");
}
if($text=~/bind my soul/i)
{
quest::say("Binding your soul. You will return here when you die.");
quest::castspell($userid,2049);
}
if($text=~/Healing Emblem/i)
{
quest::say("Yes, yes a healing emblem, don't have have one? well.. for a small fee i can give you one, nothing to much, lets say 100pp per emblem, only in platinum please? No? well fine you can make the trip to the nexus then, our leader resides there he sells the emblems, go buy one from him, otherwise you have to pay my price.")
}
}
}
sub EVENT_ITEM
{
if($mname=~ /^Soulbinder/i)
{
if($itemcount{18700} && $itemcount{18700} == 1)
##changed item to tome of discord incase anyone wants to try it on their server to try to debug.
{
quest::say("A Healing Emblem? Very well got one heal comming your way!");
quest::castspell($userid,13);
}
$myplatinum = ($platinum);
$mygold = ($gold);
$mysilver = ($silver);
$mycopper = ($copper);
if(($myplatinum = 100) && ($mygold = 0) && ($mysilver = 0) && ($mycopper = 0))
{
quest::say("Very good, here you are, One Healing Emblem, just hand it back to me when you
are in need of a heal");
quest::summonitem(18700,1);
}
else
{
quest::say("I said 100 platinum, in Platinum coins only, Here take back your money");
quest::givecash($mycopper,$mysilver,$mygold,$mypla tinum);
}
}
}
Handing him 100 pp results in the item, and handing the item results in a CH, this part works. but if i hand in any other coin combo it should say no and hand back the money, but zone is crashing, just wondering if anyone has any ideas on why its crashing, and secondly , i used the new may 12th code and the EVENT_ITEM section of this script didn't work in anyway, the text did but handing in any items didn't result in anything, any ideas on this as well? Thanks all for the help =)