Jump to content
  • 0

Req Race to Max lvl Reward giver NPC


iamjhigz

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   1
  • Joined:  08/12/17
  • Last Seen:  

Can someone give a script about this Race to max level  reward giver.. When player reaches his max level. he will talk to this npc then. give him reward. 
The reward is only for 50 players only. 

Thanks for the help.. i really appriciate it if someone release it. Thank you in advance GODBLESS 
ps. I think this will help new server maker..

Edited by iamjhigz
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  75
  • Reputation:   7
  • Joined:  08/10/17
  • Last Seen:  

14 hours ago, iamjhigz said:

Can someone give a script about this Race to max level  reward giver.. When player reaches his max level. he will talk to this npc then. give him reward. 
The reward is only for 50 players only. 

Thanks for the help.. i really appriciate it if someone release it. Thank you in advance GODBLESS 
ps. I think this will help new server maker..

prt_fild08,158,361,0	script	maxLevelRace	-1,{

	OnPCBaseLvUpEvent:
		if(baseLvl == 99 && $raceEventCap <= 50) {  	//initiate when a player reaches level 99 AND the event cap has not been reached
			$raceEventCap++;
			announce strcharinfo(0)+" has won the race to level 99! "+$raceEventCap+"/50";
			//you can reward here
			end;
		}
		else { end; }
}

warning - I don't know how to use variables /swt 

edit: I checked the variable type and I had it wrong. Use $variable for GLOBAL variable - not just attached to the character.

Spoiler
Prefix: scope and extent
  nothing - A permanent variable attached to the character, the default variable
  type. They are stored by char-server in the `char_reg_num` and
  `char_reg_str`.
  "@" - A temporary variable attached to the character.
  SVN versions before 2094 revision and RC5 version will also treat
  'l' as a temporary variable prefix, so beware of having variable
  names starting with 'l' if you want full backward compatibility.
  "$" - A global permanent variable.
  They are stored by map-server in database table `mapreg`.
  "$@" - A global temporary variable.
  This is important for scripts which are called with no RID
  attached, that is, not triggered by a specific character object.
  "." - A NPC variable.
  They exist in the NPC and disappear when the server restarts or the
  NPC is reloaded. Can be accessed from inside the NPC or by calling
  'getvariableofnpc'. Function objects can also have .variables which
  are accessible from inside the function, however 'getvariableofnpc'
  does NOT work on function objects.
  ".@" - A scope variable.
  They are unique to the instance and scope. Each instance has its
  own scope that ends when the script ends. Calling a function with
  callsub/callfunc starts a new scope, returning from the function
  ends it. When a scope ends, its variables are converted to values
  ('return .@var;' returns a value, not a reference).
  "'" - An instance variable.
  These are used with the instancing system and are unique to each
  instance type.
  "#" - A permanent local account variable.
  They are stored by char-server in the `acc_reg_num` table and
  `acc_reg_str`.
  "##" - A permanent global account variable stored by the login server.
  They are stored in the `global_acc_reg_num` table and
  `global_acc_reg_str`.
  The only difference you will note from normal # variables is when
  you have multiple char-servers connected to the same login server.
  The # variables are unique to each char-server, while the ## variables
  are shared by all these char-servers.
   
 

 

Edited by SpiritD
forgot something... lol
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   2
  • Joined:  06/27/17
  • Last Seen:  

Lazy version rewarder lol

-	script	Rewards	-1,{
	if($rewards >= 50){
		mes "50 winners already";
		close;
	}
	if(BaseLevel < 99){
		mes "not 99";
		close;
	}
	mes "congratulations";
	getitem 501,1;
	$rewards += 1;
	close;
}

 

Edited by Aisha
fix
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   1
  • Joined:  08/12/17
  • Last Seen:  

2 hours ago, SpiritD said:

prt_fild08,158,361,0	script	maxLevelRace	-1,{

	OnPCBaseLvUpEvent:
		if(baseLvl == 99 && $@raceEventCap$ <= 50) {  	//initiate when a player reaches level 99 AND the event cap has not been reached
			$@raceEventCap$++; //I dont know how to use variables :(
			announce strcharinfo(0)+" has won the race to level 99! "+$@raceEventCap$+"/50";
			//you can reward here
			end;
		}
		else { end; }
}

warning - I don't know how to use variables /swt 

thank for your effort @SpiritD:D

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   1
  • Joined:  08/12/17
  • Last Seen:  

1 hour ago, Aisha said:

Lazy version rewarder lol


-	script	Rewards	-1,{
	if($rewards >= 50){
		mes "50 winners already";
		close;
	}
	if(BaseLevel < 99){
		mes "not 99";
		close;
	}
	mes "congratulations";
	getitem 501,1;
	$rewards += 1;
	close;
}

 

thank you @Aisha ill try this also.. :D i like the title thou .hahah

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