Jump to content

Recommended Posts

Posted (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 by Viole
  • Upvote 4
Posted

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;

Posted (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 :D

Edited by bVersatile
Posted (edited)

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
Posted

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

Posted (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 by Viole
  • Upvote 3
Posted (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 by Viole
  • Upvote 3
Posted

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
Posted

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.

  • 2 weeks later...
Posted

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

  • 2 weeks later...
  • 3 months later...
Posted (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. /no1

Keep it up! /ok

Edited by eJay
  • 4 weeks later...
  • 1 month later...
Posted

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 ?

  • 2 months later...
  • 2 months later...

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...