PapaZola Posted January 6, 2012 Posted January 6, 2012 hello i want request npc quest like this case 1:tao gun ka card -need using item 50 Poring coin,100 Skull and 100 cash point case 2:thanatos card -need item 10 poring coin 50 skull and 50 cash point thx Quote
PapaZola Posted January 8, 2012 Author Posted January 8, 2012 (edited) Slim have some problem i already have etc item and cash point and when i try exchange become this and here my script //Made by Lunar //Version 1.0 //12.28.08 - shop wing_shop -1,501:50 fgt_village,86,103,4, script Wing Quest 546,{ cutin "dcustom10",2; set @i,0; mes "[shop Quest NPC]"; mes "Please Select Ur Item Quest?"; mes "Select only one."; callshop "wing_shop",1; npcshopattach "wing_shop"; end; OnBuyItem: if(.BuildQuest) { for(set .e,0; !compare(getarg(.e+1) + "","cash"); set .e,.e+2) {} npcshopadditem "wing_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 "wing_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,7047,100,943,100,1019,200,150,"Cash",30099,1,"announce"; case 2: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30100,1,"announce"; case 3: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30101,1,"announce"; case 4: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30102,1,"announce"; case 5: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30103,1,"announce"; case 6: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30104,1,"announce"; case 7: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30105,1,"announce"; case 8: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30106,1,"announce"; case 9: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30107,1,"announce"; case 10: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30108,1,"announce"; case 11: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30109,1,"announce"; case 12: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30110,1,"announce"; case 13: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30111,1,"announce"; case 14: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30112,1,"announce"; case 15: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30113,1,"announce"; case 16: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30114,1,"announce"; case 17: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30115,1,"announce"; case 18: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30116,1,"announce"; case 19: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30117,1,"announce"; case 20: callsub OnBuyItem,7047,100,943,100,1019,200,150,"Cash",30118,1,"announce"; } } Edited January 8, 2012 by PapaZola Quote
Emistry Posted January 8, 2012 Posted January 8, 2012 change if(cash < getarg(@i)) { into this if( #CASHPOINTS < getarg(@i)) { Quote
Sneaky Posted January 8, 2012 Posted January 8, 2012 Slim have some problem i already have etc item and cash point That's not even my script, lol. Quote
Question
PapaZola
hello
i want request npc quest like this
case 1:tao gun ka card
-need using item 50 Poring coin,100 Skull and 100 cash point
case 2:thanatos card
-need item 10 poring coin 50 skull and 50 cash point
thx
6 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.