Jump to content
  • 0

Automatic Prize


Reborn

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

Hello guys..How can you able to give a prize to the last player standing in the event map automatically without talking to an NPC?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   13
  • Joined:  06/20/12
  • Last Seen:  

is it a PvP? If yes, create a OnPcKillEvent that checks if getmapusers(strcharinfo(3)) == 1, then, give the prizes.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

its an event. the player needs to flee from the monster and the last player standing will get the prize automatically without talking to any NPC

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   13
  • Joined:  06/20/12
  • Last Seen:  

Then you use something like this
 

OnPcDieEvent:
     recovery 0; 
    warp "SavePoint",0,0; // Ress player and warp out of map
    detachrid;
    if( getmapusers("your_event_map_name") == 1 ) { // If there is only one man standing
       addrid(1); // It will attach that player into script
       getitem id,amount;
       announce "Player "+strcharinfo(0)+" won the event",8;
   }
  end;

Make sure that this npc script is located on the event map, or addrid won't work.

Edited by Emistry
codebox
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...