PapaZola Posted January 6, 2012 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Share Posted January 6, 2012 (edited) //Made by Lunar //Version 1.0 //12.28.08 - shop hat_shop -1,501:50 animeresort,163,187,4, script Hat Quest 479,{ set @i,0; mes "[shop Quest NPC]"; mes "Please Select Ur Item Quest?"; mes "Select only one."; callshop "hat_shop",1; npcshopattach "hat_shop"; end; OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1),"Zeny"); set .e,.e+2) {} npcshopadditem "hat_shop",getarg(.e+2),getarg(.e)*compare(getarg(.e+1),"SZeny"); setarray .Shop[.i],getarg(.e+2); set .i,.i+1; goto Hat_Setup; } if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Hat_Setup; } for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Hat_Setup; } mes "[shop Quest NPC]"; mes "I require the following:"; for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((Zeny>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Zeny"; mes "^000000In exchange, I will give you:^0000FF"; for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i)); switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) { case 1: for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) { next; mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + "."; mes "Please obtain ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000."; close; } if(Zeny < getarg(@i)) { next; mes "You do not have enough Zeny."; mes "Please obtain ^FF0000" + (getarg(@i)-Zeny) + " more Zeny^000000."; close; } for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set Zeny,Zeny-getarg(@i); for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1); if (compare(getarg(@i,0),"announce")) announce strcharinfo(0) + " Have Make Quest " + getitemname(@bought_nameid) + "!",bc_all; close; case 2: set @bottomview, getlook(3); set @topview, getlook(4); set @midview, getlook(5); addtimer 1000, strnpcinfo(3)+"::On_Leave"; set @equip,getiteminfo(@bought_nameid, 5); set @view, getiteminfo(@bought_nameid, 11); if(@equip != -1 && @view > 0) { if(@equip & 1) atcommand "@changelook 3 " + @view; if(@equip & 256) atcommand "@changelook 1 " + @view; if(@equip & 512) atcommand "@changelook 2 " + @view; } next; goto OnBuyItem; case 3: close; } On_Leave: atcommand "@changelook 1 " + @topview; atcommand "@changelook 2 " + @midview; atcommand "@changelook 3 " + @bottomview; set @equip,0; set @view,0; set @topview,0; set @midview,0; set @bottomview,0; end; OnInit: npcshopitem "hat_shop",0,0; set .BuildQuest,1; set .i,1; Hat_Setup: switch(.i) { default: set .BuildQuest,0; set .e,0; set .i,0; end; case 1: callsub OnBuyItem,7539,100,7420,120,7227,200,1000000,"SZeny",30169,1,"announce"; } } here script im using for quest but i have some problem how i can change 7227 to 100 cash point? Edited January 6, 2012 by PapaZola Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 6, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 6, 2012 you can do in a easier way.... Change.... Change all "Zeny" into "Cash" For Example : for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set Zeny,Zeny-getarg(@i); for(set @i,0; !compare(getarg(@i+1),"Zeny"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((Zeny>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Zeny"; into this for(set @i,0; !compare(getarg(@i+1),"Cash"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set #CASHPOINTS,#CASHPOINTS - getarg( @i ); for(set @i,0; !compare(getarg(@i+1),"Cash"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((#CASHPOINTS>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Cash Points"; When setup.....do like this way... ( Change SZENY into Cash ) case 1: callsub OnBuyItem,7539,100,7420,120,7227,200,1000,"Cash",30169,1,"announce"; Quote Link to comment Share on other sites More sharing options...
PapaZola Posted January 6, 2012 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Author Share Posted January 6, 2012 (edited) //Made by Lunar //Version 1.0 //12.28.08 - shop hat_shop -1,501:50 prontera,150,150,4, script Hat Quest 999,{ set @i,0; mes "[shop Quest NPC]"; mes "Please Select Ur Item Quest?"; mes "Select only one."; callshop "hat_shop",1; npcshopattach "hat_shop"; end; OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1),"cash"); set .e,.e+2) {} npcshopadditem "hat_shop",getarg(.e+2),getarg(.e)*compare(getarg(.e+1),"Scash"); setarray .Shop[.i],getarg(.e+2); set .i,.i+1; goto Hat_Setup; } if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Hat_Setup; } for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Hat_Setup; } mes "[shop Quest NPC]"; mes "I require the following:"; for(set @i,0; !compare(getarg(@i+1),"cash"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((#CASHPOINTS>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Cash Points"; mes "^000000In exchange, I will give you:^0000FF"; for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i)); switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) { case 1: for(set @i,0; !compare(getarg(@i+1),"cash"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) { next; mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + "."; mes "Please obtain ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000."; close; } if(cash < getarg(@i)) { next; mes "You do not have enough cash."; mes "Please obtain ^FF0000" + (getarg(@i)-cash) + " more cash^000000."; close; } for(set @i,0; !compare(getarg(@i+1),"cash"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set #CASHPOINTS,#CASHPOINTS - getarg( @i ); for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1); if (compare(getarg(@i,0),"announce")) announce strcharinfo(0) + " Have Make Quest " + getitemname(@bought_nameid) + "!",bc_all; close; case 2: set @bottomview, getlook(3); set @topview, getlook(4); set @midview, getlook(5); addtimer 1000, strnpcinfo(3)+"::On_Leave"; set @equip,getiteminfo(@bought_nameid, 5); set @view, getiteminfo(@bought_nameid, 11); if(@equip != -1 && @view > 0) { if(@equip & 1) atcommand "@changelook 3 " + @view; if(@equip & 256) atcommand "@changelook 1 " + @view; if(@equip & 512) atcommand "@changelook 2 " + @view; } next; goto OnBuyItem; case 3: close; } On_Leave: atcommand "@changelook 1 " + @topview; atcommand "@changelook 2 " + @midview; atcommand "@changelook 3 " + @bottomview; set @equip,0; set @view,0; set @topview,0; set @midview,0; set @bottomview,0; end; OnInit: npcshopitem "hat_shop",0,0; set .BuildQuest,1; set .i,1; Hat_Setup: switch(.i) { default: set .BuildQuest,0; set .e,0; set .i,0; end; case 1: callsub OnBuyItem,7539,100,7420,120,7227,200,1000,"Cash",30000,1,"announce"; } } got this error sir emistry Edited January 6, 2012 by PapaZola Quote Link to comment Share on other sites More sharing options...
Variant Posted January 6, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 52 Reputation: 6 Joined: 01/06/12 Last Seen: December 12, 2017 Share Posted January 6, 2012 (edited) npcshopadditem "hat_shop",getarg(.e+2),getarg(.e)*compare(getarg(.e+1),"Scash"); should be npcshopadditem "hat_shop",getarg(.e+2),getarg(.e)*compare(getarg(.e+1),"cash"); I'm pretty sure, if I'm reading this correctly. Edited January 6, 2012 by vijay Quote Link to comment Share on other sites More sharing options...
PapaZola Posted January 6, 2012 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Author Share Posted January 6, 2012 still have warning and debug Quote Link to comment Share on other sites More sharing options...
Variant Posted January 6, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 52 Reputation: 6 Joined: 01/06/12 Last Seen: December 12, 2017 Share Posted January 6, 2012 (edited) Edit: It should be "cash", not "Scash", don't change that back. Also, those warnings are normal, compare is just telling you that you're comparing an int to a string, which isn't that bad (a conversion to a higher data type), it's because the script goes through the arguments until it hits the "Cash" argument, which is the only string, which is why you get all those messages beforehand (you'll basically get one of those messages per "Item,Price" you add). So, it should be working fine, those messages don't pose a problem for you, unless you're extremely annoyed by it, in which case, I think there's an option somewhere to disable warnings... I wonder if it'd be possible to cast integers as strings... hm, I guess you could always just make a temporary variable and set it equal to "" + getarg(.e+1), but uh, that sounds like too much extra trouble. Edited January 6, 2012 by vijay Quote Link to comment Share on other sites More sharing options...
PapaZola Posted January 6, 2012 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Author Share Posted January 6, 2012 yeah me already change Quote Link to comment Share on other sites More sharing options...
Kenpachi Posted January 6, 2012 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 764 Reputation: 220 Joined: 11/14/11 Last Seen: November 19, 2020 Share Posted January 6, 2012 This error is caused by all calls of compare() inside your script. compare() wants to compare two strings. Not an integer and a string. Change the getarg(.e+1) and getarg(.e+0) inside the compare() functions to getarg(.e+1) + "" or getarg(.e+0) + "", this will force the script engine to cast it as string. Quote Link to comment Share on other sites More sharing options...
PapaZola Posted January 6, 2012 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Author Share Posted January 6, 2012 hurmm so its wont work? Quote Link to comment Share on other sites More sharing options...
Kenpachi Posted January 6, 2012 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 764 Reputation: 220 Joined: 11/14/11 Last Seen: November 19, 2020 Share Posted January 6, 2012 Here is an updated (but untested) version. //Made by Lunar //Version 1.0 //12.28.08 - shop hat_shop -1,501:50 prontera,150,150,4, script Hat Quest 999,{ set @i,0; mes "[shop Quest NPC]"; mes "Please Select Ur Item Quest?"; mes "Select only one."; callshop "hat_shop",1; npcshopattach "hat_shop"; end; OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1) + "","cash"); set .e,.e+2) {} npcshopadditem "hat_shop",getarg(.e+2),getarg(.e)*compare(getarg(.e+1) + "","cash"); setarray .Shop[.i],getarg(.e+2); set .i,.i+1; goto Hat_Setup; } if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Hat_Setup; } for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Hat_Setup; } mes "[shop Quest NPC]"; mes "I require the following:"; for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((#CASHPOINTS>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Cash Points"; mes "^000000In exchange, I will give you:^0000FF"; for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i)); switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) { case 1: for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) { next; mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + "."; mes "Please obtain ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000."; close; } if(cash < getarg(@i)) { next; mes "You do not have enough cash."; mes "Please obtain ^FF0000" + (getarg(@i)-cash) + " more cash^000000."; close; } for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set #CASHPOINTS,#CASHPOINTS - getarg( @i ); for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1); if (compare(getarg(@i,0) + "","announce")) announce strcharinfo(0) + " Have Make Quest " + getitemname(@bought_nameid) + "!",bc_all; close; case 2: set @bottomview, getlook(3); set @topview, getlook(4); set @midview, getlook(5); addtimer 1000, strnpcinfo(3)+"::On_Leave"; set @equip,getiteminfo(@bought_nameid, 5); set @view, getiteminfo(@bought_nameid, 11); if(@equip != -1 && @view > 0) { if(@equip & 1) atcommand "@changelook 3 " + @view; if(@equip & 256) atcommand "@changelook 1 " + @view; if(@equip & 512) atcommand "@changelook 2 " + @view; } next; goto OnBuyItem; case 3: close; } On_Leave: atcommand "@changelook 1 " + @topview; atcommand "@changelook 2 " + @midview; atcommand "@changelook 3 " + @bottomview; set @equip,0; set @view,0; set @topview,0; set @midview,0; set @bottomview,0; end; OnInit: npcshopitem "hat_shop",0,0; set .BuildQuest,1; set .i,1; Hat_Setup: switch(.i) { default: set .BuildQuest,0; set .e,0; set .i,0; end; case 1: callsub OnBuyItem,7539,100,7420,120,7227,200,1000,"Cash",30000,1,"announce"; } } 2 Quote Link to comment Share on other sites More sharing options...
PapaZola Posted January 6, 2012 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Author Share Posted January 6, 2012 thx Kenpachi its work fine no more error thx a lot to Kenpachi,Emistry,Variant Quote Link to comment Share on other sites More sharing options...
Zagreuz Posted January 8, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 81 Reputation: 5 Joined: 11/19/11 Last Seen: November 29, 2023 Share Posted January 8, 2012 (edited) regarding on the cash or zeny point in the case, what if i dont want any cash or zeny involved in the quest making, how can i remove the cash/zeny involvement Edited January 8, 2012 by LordOfHeRO Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 8, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted January 8, 2012 change ...1000,"Cash"..... to this ...0,"Cash"..... Quote Link to comment Share on other sites More sharing options...
Zagreuz Posted January 8, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 81 Reputation: 5 Joined: 11/19/11 Last Seen: November 29, 2023 Share Posted January 8, 2012 (edited) at the map server console, it was showing [Warning]: itemdb_search: Item ID 0 does not exists in the item_db. Using dummy data. ignore that error ? or troublesome ? Edited January 8, 2012 by LordOfHeRO Quote Link to comment Share on other sites More sharing options...
NeoGenesis Posted February 29, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 120 Reputation: 0 Joined: 01/03/12 Last Seen: August 26, 2017 Share Posted February 29, 2012 (edited) · Hidden by NeoGenesis, March 25, 2012 - no reason Hidden by NeoGenesis, March 25, 2012 - no reason my script not working .. how to fix that ?? can help me ? this script not work in my server .. can help me how to fix that ?? //Made by Lunar //Version 1.0 //12.28.08 - shop hat_shop -1,501:50 prontera,150,150,4, script Hat Quest 999,{ set @i,0; mes "[shop Quest NPC]"; mes "Please Select Ur Item Quest?"; mes "Select only one."; callshop "hat_shop",1; npcshopattach "hat_shop"; end; OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1) + "","cash"); set .e,.e+2) {} npcshopadditem "hat_shop",getarg(.e+2),getarg(.e)*compare(getarg(.e+1) + "","cash"); setarray .Shop[.i],getarg(.e+2); set .i,.i+1; goto Hat_Setup; } if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Hat_Setup; } for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Hat_Setup; } mes "[shop Quest NPC]"; mes "I require the following:"; for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((#CASHPOINTS>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Cash Points"; mes "^000000In exchange, I will give you:^0000FF"; for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i)); switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) { case 1: for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) { next; mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + "."; mes "Please obtain ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000."; close; } if(cash < getarg(@i)) { next; mes "You do not have enough cash."; mes "Please obtain ^FF0000" + (getarg(@i)-cash) + " more cash^000000."; close; } for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set #CASHPOINTS,#CASHPOINTS - getarg( @i ); for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1); if (compare(getarg(@i,0) + "","announce")) announce strcharinfo(0) + " Have Make Quest " + getitemname(@bought_nameid) + "!",bc_all; close; case 2: set @bottomview, getlook(3); set @topview, getlook(4); set @midview, getlook(5); addtimer 1000, strnpcinfo(3)+"::On_Leave"; set @equip,getiteminfo(@bought_nameid, 5); set @view, getiteminfo(@bought_nameid, 11); if(@equip != -1 && @view > 0) { if(@equip & 1) atcommand "@changelook 3 " + @view; if(@equip & 256) atcommand "@changelook 1 " + @view; if(@equip & 512) atcommand "@changelook 2 " + @view; } next; goto OnBuyItem; case 3: close; } On_Leave: atcommand "@changelook 1 " + @topview; atcommand "@changelook 2 " + @midview; atcommand "@changelook 3 " + @bottomview; set @equip,0; set @view,0; set @topview,0; set @midview,0; set @bottomview,0; end; OnInit: npcshopitem "hat_shop",0,0; set .BuildQuest,1; set .i,1; Hat_Setup: switch(.i) { default: set .BuildQuest,0; set .e,0; set .i,0; end; case 1: callsub OnBuyItem,7539,100,7420,120,7227,200,1000,"Cash",30000,1,"announce"; } } //Made by Lunar //Version 1.0 //12.28.08 - shop hat_shop -1,501:50 prontera,155,171,4 script Hat Quest 62,{ set @i,0; mes "[shop Quest NPC]"; mes "Please Select Ur Item Quest?"; mes "Select only one."; callshop "hat_shop",1; npcshopattach "hat_shop"; end; OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1) + "","cash"); set .e,.e+2) {} npcshopadditem "hat_shop",getarg(.e+2),getarg(.e)*compare(getarg(.e+1) + "","cash"); setarray .Shop[.i],getarg(.e+2); set .i,.i+1; goto Hat_Setup; } if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Hat_Setup; } for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Hat_Setup; } mes "[shop Quest NPC]"; mes "I require the following:"; for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((#CASHPOINTS>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Cash Points"; mes "^000000In exchange, I will give you:^0000FF"; for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i)); switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) { case 1: for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) { next; mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + "."; mes "Please obtain ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000."; close; } if(cash < getarg(@i)) { next; mes "You do not have enough cash."; mes "Please obtain ^FF0000" + (getarg(@i)-cash) + " more cash^000000."; close; } for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set #CASHPOINTS,#CASHPOINTS - getarg( @i ); for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1); if (compare(getarg(@i,0) + "","announce")) announce strcharinfo(0) + " Have Make Quest " + getitemname(@bought_nameid) + "!",bc_all; close; case 2: set @bottomview, getlook(3); set @topview, getlook(4); set @midview, getlook(5); addtimer 1000, strnpcinfo(3)+"::On_Leave"; set @equip,getiteminfo(@bought_nameid, 5); set @view, getiteminfo(@bought_nameid, 11); if(@equip != -1 && @view > 0) { if(@equip & 1) atcommand "@changelook 3 " + @view; if(@equip & 256) atcommand "@changelook 1 " + @view; if(@equip & 512) atcommand "@changelook 2 " + @view; } next; goto OnBuyItem; case 3: close; } On_Leave: atcommand "@changelook 1 " + @topview; atcommand "@changelook 2 " + @midview; atcommand "@changelook 3 " + @bottomview; set @equip,0; set @view,0; set @topview,0; set @midview,0; set @bottomview,0; end; OnInit: npcshopitem "hat_shop",0,0; set .BuildQuest,1; set .i,1; Hat_Setup: switch(.i) { default: set .BuildQuest,0; set .e,0; set .i,0; end; case 1: callsub OnBuyItem,7539,100,7420,120,7227,200,1000,"Cash",5170,1,"announce"; } } New_Quest1.txt Edited February 29, 2012 by Arcenciel Codeboxed Link to comment
NeoGenesis Posted March 25, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 120 Reputation: 0 Joined: 01/03/12 Last Seen: August 26, 2017 Share Posted March 25, 2012 (edited) help me fix this .. all item have but no item get .. cash point problem .. have cash but item can get why ?? -.-" //Made by Lunar //Version 1.0 //12.28.08 - shop hat_shop3 -1,501:50 quiz_02,367,353,4 script Hat Lower Quest 550,{ set @i,0; mes "[shop Quest NPC]"; mes "Please Select Ur Item Quest?"; mes "Select only one."; callshop "hat_shop3",1; npcshopattach "hat_shop3"; end; OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1) + "","cash"); set .e,.e+2) {} npcshopadditem "hat_shop3",getarg(.e+2),getarg(.e)*compare(getarg(.e+1) + "","cash"); setarray .Shop[.i],getarg(.e+2); set .i,.i+1; goto Hat_Setup; } if(.Shop[@i]!=@bought_nameid) for(set @i,1; 1; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set .i,@i; callsub Hat_Setup; } for(set @i,1; !@e; set @i,@i+1) if(.Shop[@i]==@bought_nameid) { set @e,1; set .i,@i; callsub Hat_Setup; } mes "[shop Quest NPC]"; mes "I require the following:"; for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) mes "^FF0000" + ((countitem(getarg(@i))>=getarg(@i+1))? "^00FF00":"") + "" + getarg(@i+1) + " " + getitemname(getarg(@i)) + " [" + countitem(getarg(@i)) + "/" + getarg(@i+1) + "]"; if(getarg(@i)) mes "^FF0000" + ((#CASHPOINTS>=getarg(@i))? "^00FF00":"") + "" + getarg(@i) + " Cash Points"; mes "^000000In exchange, I will give you:^0000FF"; for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) mes getarg(@i+1) + " " + getitemname(getarg(@i)); switch(select("Exchange:" + (((((getiteminfo(@bought_nameid,5) & 1) || (getiteminfo(@bought_nameid,5) & 256) || (getiteminfo(@bought_nameid,5) & 512)) && @equip==0))? "Preview Item":"") + ":No thanks")) { case 1: for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) if(countitem(getarg(@i)) < getarg(@i+1)) { next; mes "You have " + countitem(getarg(@i)) + " " + getitemname(getarg(@i)) + ", while I require " + getarg(@i+1) + "."; mes "Please obtain ^FF0000" + (getarg(@i+1)-countitem(getarg(@i))) + " more " + getitemname(getarg(@i)) + "^000000."; close; } if(cash < getarg(@i)) { next; mes "You do not have enough cash."; mes "Please obtain ^FF0000" + (getarg(@i)-cash) + " more cash^000000."; close; } for(set @i,0; !compare(getarg(@i+1) + "","cash"); set @i,@i+2) delitem getarg(@i),getarg(@i+1); set #CASHPOINTS,#CASHPOINTS - getarg( @i ); for(set @i,@i+2; getarg(@i+1,0); set @i,@i+2) getitem getarg(@i),getarg(@i+1); if (compare(getarg(@i,0) + "","announce")) announce strcharinfo(0) + " Have Make Quest " + getitemname(@bought_nameid) + "!",bc_all; close; case 2: set @bottomview, getlook(3); set @topview, getlook(4); set @midview, getlook(5); addtimer 1000, strnpcinfo(3)+"::On_Leave"; set @equip,getiteminfo(@bought_nameid, 5); set @view, getiteminfo(@bought_nameid, 11); if(@equip != -1 && @view > 0) { if(@equip & 1) atcommand "@changelook 3 " + @view; if(@equip & 256) atcommand "@changelook 1 " + @view; if(@equip & 512) atcommand "@changelook 2 " + @view; } next; goto OnBuyItem; case 3: close; } On_Leave: atcommand "@changelook 1 " + @topview; atcommand "@changelook 2 " + @midview; atcommand "@changelook 3 " + @bottomview; set @equip,0; set @view,0; set @topview,0; set @midview,0; set @bottomview,0; end; OnInit: npcshopitem "hat_shop3",0,0; set .BuildQuest,1; set .i,1; Hat_Setup: switch(.i) { default: set .BuildQuest,0; set .e,0; set .i,0; end; case 1: callsub OnBuyItem,671,500,673,500,674,500,675,500,677,500,7539,500,7420,300,7227,2000,30396,50,1000,"cash",30364,1,"announce"; } } Edited March 26, 2012 by Arcenciel Codeboxed Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 25, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 25, 2012 Any Error Shown ?? show it and please use Codebox to wrap the script coz it is long..>.< Quote Link to comment Share on other sites More sharing options...
NeoGenesis Posted March 27, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 120 Reputation: 0 Joined: 01/03/12 Last Seen: August 26, 2017 Share Posted March 27, 2012 y cant get that ?? cash point me get .. all item get then exchange item not get .. -.-" help me emistry .. sry bad english .. Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 27, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 27, 2012 change all cash to #CASHPOINTS Quote Link to comment Share on other sites More sharing options...
NeoGenesis Posted March 29, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 120 Reputation: 0 Joined: 01/03/12 Last Seen: August 26, 2017 Share Posted March 29, 2012 at where ?? Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 29, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted March 29, 2012 at here if(cash < getarg(@i)) { next; mes "You do not have enough cash."; mes "Please obtain ^FF0000" + (getarg(@i)-cash) + " more cash^000000."; close; } change all cash to #CASHPOINTS 1 Quote Link to comment Share on other sites More sharing options...
NeoGenesis Posted March 29, 2012 Group: Members Topic Count: 40 Topics Per Day: 0.01 Content Count: 120 Reputation: 0 Joined: 01/03/12 Last Seen: August 26, 2017 Share Posted March 29, 2012 not working .. T.T not working .. T.T no working .. !! Quote Link to comment Share on other sites More sharing options...
Question
PapaZola
here script im using for quest
but i have some problem
how i can change 7227 to 100 cash point?
Edited by PapaZolaLink to comment
Share on other sites
21 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.