excaliber7388

01-14-2006, 10:37 PM

I know this isn't what you wanted to see, but anyway, whats wrong with this shop script?

// NPC made by Excaliber

if (created)

{

setshape 1,32,32;

}

if(actionbuy)

{

with(getplayer(#p(0)))

{

if(strequals(#c,buy thunder shot) && playerrupees>249999 && strtofloat(#s(serverr.thundershotstock>0)))

{

playerrupees-=250000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+250000);

addweapon Thunder Shot;

}

if(strequals(#c,buy thunder spin) && playerrupees>17499 && strtofloat(#s(serverr.thunderspinstock>0)))

{

playerrupees-=17500;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+17500);

addweapon Thunder Spin;

}

if(strequals(#c,buy flame wall) && playerrupees>9499 && strtofloat(#s(serverr.flamewallstock>0)))

{

playerrupees-=9500;

addweapon Flame Wall;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+9500);

}

if(strequals(#c,buy thunder wall) && playerrupees>10999 && strtofloat(#s(serverr.thunderwallstock>0)))

{

playerrupees-=11000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+11000);

addweapon Thunder Wall;

}

if(strequals(#c,buy fire spin 2) && playerrupees>14999 && strtofloat(#s(serverr.firespin2stock>0)))

{

playerrupees-=15000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+15000);

addweapon Fire Spin 2;

}

if(strequals(#c,buy nuke shot 2)&& playerrupees>14999 && strtofloat(#s(serverr.nukeshot2stock>0)))

{

playerrupees-=15000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+15000);

addweapon Nuke Shot 2;

}

}

}

//#CLIENTSIDE

if(playerchats)

{

triggeraction x,y,buy,#a,#c;

}

// NPC made by Excaliber

if (created)

{

setshape 1,32,32;

}

if(actionbuy)

{

with(getplayer(#p(0)))

{

if(strequals(#c,buy thunder shot) && playerrupees>249999 && strtofloat(#s(serverr.thundershotstock>0)))

{

playerrupees-=250000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+250000);

addweapon Thunder Shot;

}

if(strequals(#c,buy thunder spin) && playerrupees>17499 && strtofloat(#s(serverr.thunderspinstock>0)))

{

playerrupees-=17500;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+17500);

addweapon Thunder Spin;

}

if(strequals(#c,buy flame wall) && playerrupees>9499 && strtofloat(#s(serverr.flamewallstock>0)))

{

playerrupees-=9500;

addweapon Flame Wall;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+9500);

}

if(strequals(#c,buy thunder wall) && playerrupees>10999 && strtofloat(#s(serverr.thunderwallstock>0)))

{

playerrupees-=11000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+11000);

addweapon Thunder Wall;

}

if(strequals(#c,buy fire spin 2) && playerrupees>14999 && strtofloat(#s(serverr.firespin2stock>0)))

{

playerrupees-=15000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+15000);

addweapon Fire Spin 2;

}

if(strequals(#c,buy nuke shot 2)&& playerrupees>14999 && strtofloat(#s(serverr.nukeshot2stock>0)))

{

playerrupees-=15000;

setstring serverr.eventsbalance,#v(strtofloat(#s(serverr.eve ntsbalance))+15000);

addweapon Nuke Shot 2;

}

}

}

//#CLIENTSIDE

if(playerchats)

{

triggeraction x,y,buy,#a,#c;

}