Jump to content

Rewards NPC [In-Game Set]


Santino

Recommended Posts


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

Script

  • For GM's to assign a Reward in-Game.
  • To a 'specific' player. (Player name)
  • To a 'specific' party. (Party name)
  • Set the quantity of the reward to be given.

Version

  • Current Version : 1.6

Features

  • Players can claim their rewards (if they have) by typing their names.
  • Player who inputs other's name, is kicked by the npc.
  • Once a player claims his/her reward, npc will delete it from db.
  • Players will receive a message if a GM has sent a process.
  • Offline players will not receive any message, ofcourse, but can still claim the rewards afterwards.
  • Only party/guild leaders can claim their rewards by typing their party/guild names.
  • Non-party/guild leaders are ignored by the npc.
  • No-party/guild-players are also ignored by the npc.
  • Show Unclaimed Processes (Player/Party/Guild)
  • Once a party/guild leader claims their reward, npc will delete it from db.
  • Broadcast to all if a GM has added a process to a party/guild.

Changelogs

  • Rewards NPC 1.0 Items recognized are only from item_db
  • Rewards NPC 1.1 Items recognized from item_db to item_db2
  • Rewards NPC 1.1 Prevent null from typing 0 in item & amount
  • Rewards NPC 1.1 Main: Can put many players now to give item
  • Rewards NPC 1.2 Fixed Cancel the process option
  • Rewards NPC 1.2 Added Delete a process or all process option
  • Rewards NPC 1.3 Added Show Current Processes option
  • Rewards NPC 1.4 Added Party Option in Assign Rewards
  • Rewards NPC 1.4 Show Current Process (Player or Party)
  • Rewards NPC 1.4 Added Delete Option for Party
  • Rewards NPC 1.5 Added Guild Option in Assign Rewards
  • Rewards NPC 1.5 Show Current Process (Player/Party/Guild)
  • Rewards NPC 1.5 Added Delete Option for Guild
  • Rewards NPC 1.5 Announce. GM adds a process for Party/Guild
  • Rewards NPC 1.6 Added View Logs (Credits: Euphy) (Requested: bVersatile)

Rewards NPC.txt Deleted accidentaly! Reuploaded for future basis!

Rewards NPC 1.1.txt

Rewards NPC 1.2.txt

Rewards NPC 1.3.txt

Rewards NPC 1.4.txt

Rewards NPC 1.5.txt

Rewards NPC 1.6.txt

Edited by Viole
  • Upvote 4
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

Still working for party checks/guild checks.

._.

First time making scripts.. arrg!

anyways,

this npc script can assign a reward to a 'specific' player and set the quantity of the reward to be given.

how about this code . can i erase it?


query_sql "SELECT `id` FROM `item_db` WHERE `id` = '"+$rewarditem+"'",.@itemreward;
if (!.@itemreward) {mes "Item is invalid, not found in database!"; next; goto admin_only; }
else set .@itemreward,0;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

yes, i just added that to prevent inputing a Null item by mistake.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

oh ok. thx for this script man!

btw man . i put a escape sql. is this correct?

query_sql "SELECT `char_id` FROM `char` WHERE `name` = '"+escape_sql(.@playername$)+"'",.@charid;

so i will prevent sql injections :D

Edited by bVersatile
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

arrgg. i'm still a newbie man. lol

still learning more things /meh

did it work?

lol wrong post! XD supposed to be a message XD

yea it would. thx for that.

Edited by Viole
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

arrgg. i'm still a newbie man. lol

still learning more things /meh

did it work?

lol wrong post! XD supposed to be a message XD

yea it would. thx for that.

max 1 player can give?

how can i give 2 players. like player 1 i will set a pods 1. then player 2 i will set ygg 5.?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

updated*

thx for that bVersatile, i've added it now*

  • Rewards NPC 1.1 Items recognized from item_db to item_db2
  • Rewards NPC 1.1 Prevent null from typing 0 in item & amount
  • Rewards NPC 1.1 Main: Can put many players now to give item
  • Rewards NPC 1.2 Fixed Cancel the process option
  • Rewards NPC 1.2 Added Delete a process or all process option

Edited by Viole
  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   1
  • Joined:  07/28/12
  • Last Seen:  

nice! useful for events! thx

hmm, how about for party/guild.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

Thanks!

I forgot , I deleted the update! XD

Here it is again!

Updated*

  • Rewards NPC 1.3 Added Show Current Processes option
  • Rewards NPC 1.4 Added Party Option in Assign Rewards
  • Rewards NPC 1.4 Show Current Process (Player or Party)
  • Rewards NPC 1.4 Added Delete Option for Party

still working for guilds..

Edited by Viole
  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

Sorry. Here, for guilds.

Updated*

  • Rewards NPC 1.5 Added Guild Option in Assign Rewards
  • Rewards NPC 1.5 Show Current Process (Player/Party/Guild)
  • Rewards NPC 1.5 Added Delete Option for Guild
  • Rewards NPC 1.5 Announce. GM adds a process for Party/Guild

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Could probably use some functions (or callsubs) to reduce the number of repeating lines. Also, you could do all of this in 1 SQL table instead of 3.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

/wah Ahhm, still my first script. I'll learn more from what you said sir! thx.
  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

request :D add logs!

like example.

[sender NAme ] Gave [item name / Amounts] on [Receiver name]

Edited by bVersatile
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

Okay, I'll work on it soon, thanks for that.

Btw, I'm done with the logs, but i wanna ask a word from you. XD

Which is better, players can view the logs, or not? XD

Added:

Rewards NPC 1.6.txt Added View Logs (Credits: Euphy) (Requested: bVersatile)

Link to comment
Share on other sites


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

hmm..why not just use SQL to log your stuff ? the script itself are SQL based....so no need to worry on users using TXT / SQL..since it only work for SQL..

and it save you from using permanent global variable to store the log ....easy to handle..and organized nicely....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

As i said ( in the script note xD) , I still sucked at SQL's , i can't even make it into 1 sql, lol. If I have time, i'll practice XD

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   0
  • Joined:  11/21/11
  • Last Seen:  

Sir how to add items + lots and refine its

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   7
  • Joined:  04/03/12
  • Last Seen:  

thx ^^!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  80
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   76
  • Joined:  03/22/12
  • Last Seen:  

As i said ( in the script note xD) , I still sucked at SQL's , i can't even make it into 1 sql, lol. If I have time, i'll practice XD

Yeah try and try until you die, lol. i'm just kidding :)

Good Work! man your script is useful for me. /no1

Keep it up! /ok

Edited by eJay
Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  323
  • Reputation:   9
  • Joined:  11/19/11
  • Last Seen:  

This is bug? When i add 3 kind of item and the player recieved 1 item only?

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

up post.

 

can someone add new features on this npc ? 

for example.

when GM send cotton shirt to player.

gm can set 0-10 refine rate there.

by type 0-10 on the empty column on the prompt. 

can someone did that ?

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  04/26/13
  • Last Seen:  

thank you.

Edited by majisoka
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   4
  • Joined:  06/20/13
  • Last Seen:  

how to change announce color?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

how to change announce color?

 

announce "Party leader of the party ["+@partyname$+"], please claim your "+@partyrewardamount+" "+getitemname(@partyrewarditem)+"s from the Rewards NPC! ",0,0xDBA901;

Change the 0xDBA901 part to your desired color : ( 0xRRGGBB ). Moreover, this site will help you http://www.rapidtables.com/web/color/RGB_Color.htm

 

  • 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
Reply to this topic...

×   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...