Jump to content
  • 0

Coupons (Something new)


Mabuhay

Question


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

I found some coupon npcs scripts but i want to have something more new.

So example, i have 2 players, i will send them 2 different coupons and these coupons will give different items. how can i do that?

sample coupon code: abcd will give 2 607 while coupon code: 1234 will give 2 608 and so on. I will make my own coupon codes. this is intended to reward beta testers in my server but i will only choose those who played longer. you know what i mean :D thanks :)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Here are 2 ways you could write the NPC:

1. store the coupon codes & prizes in permanent global variables

2. store the coupon codes & prizes in a SQL table

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I think better go for SQL

coupon_giver0.1.txt

kinda lazy to add something like giving a signed item ... and lousy dialog at the moment

getitemname2 function btw

Edited by AnnieRuru
  • Upvote 1
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...