Jump to content
  • 0

Npc donation


Eucharist96

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   2
  • Joined:  12/09/11
  • Last Seen:  

can someone teach me how to make

or help me to make Dynamic Npc For Donations?? =)) thank you

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

if you want to learn scripting...

Read these...

Basic_Scripting

Script_Command

Scripting for Dummies

If you are request for a script...( Since you are posting in Script Request Section )

then you must explain / give details on what script you are going to request with

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   2
  • Joined:  12/09/11
  • Last Seen:  

hmm i want like tcg traders but i want it for Pods =))

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

anyway,..next time you can try browse the Request Section ...xD

coz most of the time....the script like these could have made by other members as well in previous topic / posts.. ^^

for example

prontera,138,183,5 script TCG Uppers 793,{
mes .name$;
mes "You currently have "+countitem(.tcg_item)+" TCG.";
mes "Would you like to look at the shop?";
next;
if(select("Yes:No") == 2) {close;}
close2;
callshop "TCG_SHOP",1;
npcshopattach "TCG_SHOP";
dispbottom "You currently have "+countitem(.tcg_item)+" TCG.";
end;
OnBuyItem:
for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {
for(set @j,0; @j < getarraysize(.TCG_ITEMS); set @j,@j+1) {
if(.TCG_ITEMS[@j] == @bought_nameid[@i]) {
set @itemcost,(.ITEMPRICE[@j]*@bought_quantity[@i]);
set @totalcost,(@totalcost+@itemcost);
break;
}
}
}
if(@totalcost > countitem(.tcg_item)) {
dispbottom "You don't have enough TCG.";
} else {
for(set @i,0; @i < getarraysize(@bought_nameid); set @i,@i+1) {
getitem @bought_nameid[@i],@bought_quantity[@i];
}
delitem .tcg_item,@totalcost;
dispbottom "Thank you for shopping.";
dispbottom "You now have "+countitem(.tcg_item)+" TCG left.";
}
set @totalcost,0;
deletearray @bought_nameid[0],128;
deletearray @bought_quantity[0],128;
end;
OnInit:
npcshopdelitem "TCG_SHOP",909; // Leave this alone
set .name$,"[TCG Uppers]";
set .tcg_item,7227; // Input TCG ID
setarray .TCG_ITEMS[0],20001; // Item IDs - 128 max
setarray .ITEMPRICE[0],30; // Item prices - Should followe ID's order
for(set .@i,0; .@i < getarraysize(.TCG_ITEMS); set .@i,.@i+1) {
npcshopadditem "TCG_SHOP",.TCG_ITEMS[.@i],.ITEMPRICE[.@i];
}
end;
}
- shop TCG_SHOP -1,909:20

Change Item Required here :

set .tcg_item,7227; // Input TCG ID

Set your Items / Price here :

setarray .TCG_ITEMS[0],20001; // Item IDs - 128 max
setarray .ITEMPRICE[0],30; // Item prices - Should followe ID's order

if you want to Duplicate the NPC for other items.

change all this

TCG_SHOP

to other

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  54
  • Reputation:   2
  • Joined:  12/09/11
  • Last Seen:  

Sry My bad im new at scripting i don't know how to add items on it to trade

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

wan to add a list of item just simple like this ~

For Example :

setarray .TCG_ITEMS[0],607,608,609,610,611,612;
setarray .ITEMPRICE[0], 30, 10, 12, 13,100,500;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...