Jump to content

@go alternative in NPC form : @go2 command


jTynne

Recommended Posts


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  399
  • Reputation:   198
  • Joined:  11/09/11
  • Last Seen:  

jTynne's @go Command Alternative In .txt Format!

This is my custom alternative to @go that allows end users the ability to EASILY add/change @go locations on the fly without the need to edit any source files OR recompling/rebooting their server. This is a highly customizable script that is pretty straight-forward in its coding. You can easily add in or adjust existing @go locations in seconds.

Please Note: This will replace the default @go command when loaded in-game!

Instructions / Customization

To use? Simply upload and @loadnpc the file in-game and @go will be modified. If you wish to add in a new @go location, all you have to do is add a new entry following the format noted below:

if(@warp$ == "35" || @warp$ == "ecl" || @warp$ == "ecla" || @warp$ == "eclag" || @warp$ == "eclage") { callsub Process,"eclage",110,39,0,0; }

if(@warp$ == "36" || @warp$ == "ser" || @warp$ == "sere" || @warp$ == "seren" || @warp$ == "serenglade") { callsub Process,"serenglade",34,82,0,0; }

As noted in the text in red above, you add in a number higher than the current highest value (in the script currently, Eclage is 35, so to add in a custom location, simply add in a value of 36, customize the text based warp strings you want (for @go 36, in the above example, you can either use @go 36 or @go ser @go sere @go seren or @go serenglade, and all will teleport you to the same location of serenglade <34,82>).

Planned for future releases:

- Additional options GM's can set for the command in the header. (Re-use delay, price per use option)

Version History : Current Version 2.0

2.0 Dec 31st, 2012 : http://www.jtynne.com/rAthena/scripts/gobind_v2.txt

1.0 Dec 29th, 2012: http://www.jtynne.com/rAthena/scripts/gobind.txt

Please report any bugs you may find, and/or if you have any requests / suggestions for the script as a response to this thread. Thank you!

(Please +1 me if you enjoy this script~)

  • Upvote 6
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  399
  • Reputation:   198
  • Joined:  11/09/11
  • Last Seen:  

December 31st - Script has been updated to version 2.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

This is great..!

Need to try this..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  399
  • Reputation:   198
  • Joined:  11/09/11
  • Last Seen:  

Please do let me know if there are any improvements or requests you have for the file. I've not yet had time to implement a timer warp delay or a check on whether or not the player is dead, but will in v3/v4. :)

  • Upvote 1
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

,

Your script is really great that every server owners will have less time editing in src files, compiling, etc etc just to edit their custom @go command. Very easy to configure and much less work. You can add many @go commands in less a minute :D

I wanted to ask a few queries.

- How to add a command on this script with an if check for example is #Premium variable so they will have an access to a map you've put it in.

For example:

when a normal player with variable #Premium => 1 then they will have a command to go in the specified else a dispbottom will appear that "You need to blah blah before accessing this map".
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  399
  • Reputation:   198
  • Joined:  11/09/11
  • Last Seen:  

Below,

if(@group > 0) { if(getgroupid() < @group) { dispbottom "[server] : This map cannot be accessed by your group/account level."; end;} }

Add in a check there.

if(#Premium < 1) { dispbottom "[server] : You cannot use this command without being a Premium account holder."; end; }

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Very nice; simple enough to adapt to eAthena as well. Thanks for the share.

  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   4
  • Joined:  07/10/13
  • Last Seen:  

I've used it but on my mapserver cmd its showing 

 

script error on npc/custom/atgo.txt line 9
    parse_line: expect command, missing function name or calling undeclared func
tion    
     8 :        OnInit:
*    9 :                'b'indatcmd("go","gobind::OnAtcommand",0,10);
    10 :                end;
    11 :
    12 :

 

I don't know how to correct this though but when I checked on @go command on my server on the dispbottom it shows the corresponding numbers for each place and when I changed the location once you warp where you would spawn it wouldn't change, and I understand that this error is the problem.

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

How to add delay when hit?

 

5 Seconds Delay to @go when hit

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

How to add delay when hit?

 

5 Seconds Delay to @go when hit

 

Without constantly looping while checking the players health which is extremely unadvised. I don't think it's possible.

 

I recommend you check this topic for a source mod to @go allowing the delay of @go when attacking and being attacked.

 

http://rathena.org/board/topic/84627-how-to-disable-this-delay/

 


 

But if you really want it an npc based @go.

 

-	script	Delayer	-1,{

	OnPCLoginEvent:
		if(Hp<@hp&&@hp) set @tick, gettimetick(2)+.delay;
		set @hp, Hp;
		addtimer .loop,"Delayer::OnPCLoginEvent";
		end;

	OnInit:
		set .loop, 100; //Speed of loop in Milliseconds
		set .delay, 5; //Delay in seconds.
}

 

Then just add a check in his script after

OnAtcommand:

Like

if(set(.@a,@tick-gettimetick(2))>0){ dispbottom "You must wait "+.@a+" second(s) before warping."; end; }
Edited by Skorm
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

How to add delay when hit?

 

5 Seconds Delay to @go when hit

 

Without constantly looping while checking the players health which is extremely unadvised. I don't think it's possible.

 

I recommend you check this topic for a source mod to @go allowing the delay of @go when attacking and being attacked.

 

http://rathena.org/board/topic/84627-how-to-disable-this-delay/

 


 

But if you really want it an npc based @go.

 

-	script	Delayer	-1,{

	OnPCLoginEvent:
		if(Hp!=@hp&&@hp) set @tick, gettimetick(2)+.delay;
		set @hp, Hp;
		addtimer .loop,"Delayer::OnPCLoginEvent";
		end;

	OnInit:
		set .loop, 100; //Speed of loop in Milliseconds
		set .delay, 5; //Delay in seconds.
}

 

Then just add a check in his script after

OnAtcommand:

Like

if(set(.@a,@tick-gettimetick(2))>0){ dispbottom "You must wait "+.@a+" second(s) before warping."; end; }

 

How about when hit by any monster or in battle state?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

How about when hit by any monster or in battle state?

 

If you want it to work when hit by monsters

 

remove

if(src->type == BL_PC) {

And the

}

That follows

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

How about a npc @go?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

How about a npc @go?

 

For the npc example I gave it should work regardless of what is attacking the character because it checks for a change in his HP and then applies the delay...

Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

how to make it only for GM and then global?

 

for example:

it will check if the player is lvl 99, if not, can't be used

 

all go's added by the gm will affect all players

 

thanks in advance o:!

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  181
  • Reputation:   53
  • Joined:  04/07/13
  • Last Seen:  

Looks nice, the idea is a lot like the one I had when I made a source modification with an additional database file instead of a script.
Here are some hints:

In line 15 you set @warp without even using it.
In line 31 (warp for Morocc) you check for

@warp$ == "mor"

and in line 61 (warp for Mora) you do the same check, however this second check is never reached.
 
I'd also suggest that you could use the Compare function because it could shorten the whole script (not by loc, but by words).

There is a "problem" with cities with a name consisting of two or more words, like El Dicastes or Port Malaya. Only the first word is read (as @go port malaya considers "port" as the first parameter and "malaya" as the second).

  • Upvote 1
Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  974
  • Reputation:   41
  • Joined:  11/13/11
  • Last Seen:  

is this still working?

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  974
  • Reputation:   41
  • Joined:  11/13/11
  • Last Seen:  

I tried using this and i use the mapflag "nogo" and i think it bypassing it.

 

 

http://rathena.org/wiki/Mapflag#nogo

  • Upvote 1
Link to comment
Share on other sites

  • 2 years later...

  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.03
  • Content Count:  164
  • Reputation:   8
  • Joined:  12/30/16
  • Last Seen:  

yes :) . is this possible to add inside the script

if(player is at guild_vs5)

{

disable gobind ??

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  399
  • Reputation:   198
  • Joined:  11/09/11
  • Last Seen:  

I no longer work on RO. It's been a few years, however, I'm sure there are edits to my original script out there, or, you could potentially post in the script request section. I apologize. 

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.03
  • Content Count:  164
  • Reputation:   8
  • Joined:  12/30/16
  • Last Seen:  

2 minutes ago, Eiphes said:

I no longer work on RO. It's been a few years, however, I'm sure there are edits to my original script out there, or, you could potentially post in the script request section. I apologize. 

ok sir :) but . Thankyou very much for your script /kis thankyou sir :* 

  • Upvote 1
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
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.

×
×
  • Create New...