nirwannirwan Posted February 27, 2015 Posted February 27, 2015 I want to create a usable item that can use the NPC script, and it's unlimited usable itemsThe NPC is an example can sell items and can also teleport sorry for my bad english example picture in attach file Quote
Stolao Posted February 27, 2015 Posted February 27, 2015 (edited) an example Item_db.txt 512,Apple,Apple,11,15,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "Cell-Phone"; },{},{} npc function script Cell-Phone { message strcharinfo(0),"[Cell-Phone]: What would you like?"; swithc(select("Warp:Call Pawn Shop")){ case 2: close2; callshop "Tool Dealer#alb",<option>; //callshop "<name>",<option>; //The options are: // 0 = The normal window (buy, sell and cancel) // 1 = The buy window // 2 = The sell window break; case 1: warp "Random",0,0; break; } end; } Edited February 27, 2015 by Stolao 1 Quote
nirwannirwan Posted February 28, 2015 Author Posted February 28, 2015 (edited) an example Item_db.txt 512,Apple,Apple,11,15,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "Cell-Phone"; },{},{} npc function script Cell-Phone { message strcharinfo(0),"[Cell-Phone]: What would you like?"; swithc(select("Warp:Call Pawn Shop")){ case 2: close2; callshop "Tool Dealer#alb",<option>; //callshop "<name>",<option>; //The options are: // 0 = The normal window (buy, sell and cancel) // 1 = The buy window // 2 = The sell window break; case 1: warp "Random",0,0; break; } end; } I've saved npc script on the server, i try to click the item but it does not work. I keep in npc/prime/kota/Cell-Phone.txt bump Edited February 27, 2015 by nirwannirwan Quote
Question
nirwannirwan
I want to create a usable item that can use the NPC script, and it's unlimited usable items
The NPC is an example can sell items and can also teleport
sorry for my bad english
example picture in attach file
2 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.