Jump to content
  • 0

How to set this per account ?


Heartbreak

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  


//======Name================================

========

// Daily Monster Hunt

//======Version===============================

======

// 1.2

//======Author(s)

===================================

// Sandbox

//======Comments=============================

=======

// This NPC allows your player to hunt a random amount

// of a random monster, within a random time

// *randomception!*

// If the player successfully hunts the monster

// within the time limit, he'll receive a reward!

//======Credits===============================

======

// KeyWorld, nanakiwurtz, NeoMind, Kido

// Thanks for helping me out guize!

//=========================================

=========

ra_temple,155,147,3 script Hunting Challenge 78,{

mes .Npc_Name$;

if(Hunter) {

mes "You have killed ^880000"+HuntCount

+"^000000/^0000FF"+Amt

+"^000000 "+getmonsterinfo(Hunt,0)+"s, keep it up!";

close;

}

if(gettimetick(2) < HuntDelay) {

mes "You can only do this quest once a day!";

close;

}

mes "Hello, do you want to take on the Monster Hunting Challenge?","I

will give you a random time limit to kill a random amount of a monster,

If you manage to kill them within the given time, you'll receive a TCG!";

if(select("Bring it on!:How about no?")==2) {

mes .Npc_Name$;

mes "Fine!";

close;

}

next;

mes .Npc_Name$;

Hunt = .Mob_List[rand(getarraysize(.Mob_List))];

Time = rand(6000); //Timer

Amt = rand (1,3); //Amount of mob to hunt

Hunter++;

mes "You have to hunt ^0000FF"+Amt+" "+getmonsterinfo

(Hunt,0)+"^000000 in ^AA0000"+Time+"^000000 seconds!";

next;

mes .Npc_Name$;

mes "Go go go!";

close2;

showdigit Time,3;

HuntDelay = gettimetick(2)+86400; //Once a day only.

HuntStart = gettimetick(2)+Time;

sleep2 1000*Time;

if(Hunter) dispbottom strnpcinfo(1)+": I'm sorry, you didn't

make it!";

HuntStart = 0; //Reset all variables

Hunt = 0;

Hunter = 0;

HuntCount = 0;

Time = 0;

Amt = 0;

end;

//----------Config----------

OnInit:

.Npc_Name$ = "[^0000FF NPC ^000000]";

setarray .Mob_List

[0],1511,1630,1039,2068,1272,1719,1046,1389,1112,1115,1871,1252,

1086,1832,1492,1734,1251,1779,1980,1688,1373,1147,1059,1150,108

7,1190,1038,1157,1159,1623,1583,1708,1312,1751,1685; //Mobs to

hunt. Default: Poring, Fabre, Lunatic

.Reward = 7227; //Reward ID

.RewAmt = 1; //Reward Amount

end;

OnNPCKillEvent:

if(Hunter > 0) {

if(gettimetick(2) < HuntStart) {

if(killedrid == Hunt) {

HuntCount++;

dispbottom "You have killed

"+HuntCount+"/"+Amt+" "+getmonsterinfo(Hunt,0)+"s, keep it up!";

if(HuntCount >= Amt) {

dispbottom strnpcinfo

(1)+": Congratulations! You did it!";

getitem

.Reward,.RewAmt;

HuntStart = 0;

Hunt = 0;

Hunter = 0;

HuntCount = 0;

Time = 0;

Amt = 0;

showdigit 1,3;

}

}

}

}

end;

}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  

please post an example..
i tried reading this --> http://rathena.org/wiki/Basic_Scripting#Conditions.2C_Variables.2C_and_Set
but i don't understand what it means.. or which part should i edit.. =/
should it be like 

HuntDelay = #gettimetick(2)+86400; //Once a day only.

and

if(#gettimetick(2) < HuntStart) {

sorry for being noob =/ 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

set the variable with a # to indicate account bound

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  89
  • Reputation:   7
  • Joined:  02/27/12
  • Last Seen:  

please post an example..

i tried reading this --> http://rathena.org/wiki/Basic_Scripting#Conditions.2C_Variables.2C_and_Set

but i don't understand what it means.. or which part should i edit.. =/

should it be like 

HuntDelay = #gettimetick(2)+86400; //Once a day only.

and

if(#gettimetick(2) < HuntStart) {

sorry for being noob =/ 

 

To make it account based, change all the HuntDelay to #HuntDelay

Edited by Jyabil
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   0
  • Joined:  12/02/12
  • Last Seen:  

thanks a lot :3

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