Santino Posted September 7, 2012 Posted September 7, 2012 (edited) 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 September 19, 2012 by Viole 4 Quote
PewN Posted September 7, 2012 Posted September 7, 2012 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; Quote
Santino Posted September 7, 2012 Author Posted September 7, 2012 yes, i just added that to prevent inputing a Null item by mistake. Quote
PewN Posted September 7, 2012 Posted September 7, 2012 (edited) 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 Edited September 7, 2012 by bVersatile Quote
Santino Posted September 7, 2012 Author Posted September 7, 2012 (edited) arrgg. i'm still a newbie man. lol still learning more things did it work? lol wrong post! XD supposed to be a message XD yea it would. thx for that. Edited September 7, 2012 by Viole Quote
PewN Posted September 7, 2012 Posted September 7, 2012 arrgg. i'm still a newbie man. lol still learning more things 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.? Quote
Santino Posted September 9, 2012 Author Posted September 9, 2012 (edited) 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 September 9, 2012 by Viole 3 Quote
mulespro Posted September 9, 2012 Posted September 9, 2012 nice! useful for events! thx hmm, how about for party/guild. 1 Quote
Santino Posted September 9, 2012 Author Posted September 9, 2012 (edited) 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 September 9, 2012 by Viole 3 Quote
Santino Posted September 9, 2012 Author Posted September 9, 2012 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 3 Quote
Euphy Posted September 9, 2012 Posted September 9, 2012 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. Quote
Santino Posted September 9, 2012 Author Posted September 9, 2012 Ahhm, still my first script. I'll learn more from what you said sir! thx. 1 Quote
PewN Posted September 19, 2012 Posted September 19, 2012 (edited) request add logs! like example. [sender NAme ] Gave [item name / Amounts] on [Receiver name] Edited September 19, 2012 by bVersatile Quote
Santino Posted September 19, 2012 Author Posted September 19, 2012 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) Quote
Emistry Posted September 19, 2012 Posted September 19, 2012 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.... Quote
Santino Posted September 19, 2012 Author Posted September 19, 2012 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 Quote
tjungz212 Posted September 28, 2012 Posted September 28, 2012 Sir how to add items + lots and refine its Quote
eJay Posted January 5, 2013 Posted January 5, 2013 (edited) 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. Keep it up! Edited January 5, 2013 by eJay Quote
Tonetzkii Posted February 1, 2013 Posted February 1, 2013 This is bug? When i add 3 kind of item and the player recieved 1 item only? Quote
mrlongshen Posted March 28, 2013 Posted March 28, 2013 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 ? Quote
majisoka Posted June 6, 2013 Posted June 6, 2013 (edited) thank you. Edited June 6, 2013 by majisoka Quote
Patskie Posted September 3, 2013 Posted September 3, 2013 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 1 Quote
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.