Jump to content
  • 0

Warp Scroll


nunesb

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

So, could someone help me with a scroll that when be used appear a

bar and you can write one map coordinates and you will be teleported to this place, like @warp but as an item ?

Edited by nunesb
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

    message strcharinfo(0),"Teleport to...";
   dispbottom "map,x,y";
   input .@i$;
   explode(.@j$,.@i$,",");
   if (getmapusers(.@j$[0]) >= 0) {
       delitem your_item,1; // Type item ID here
       warp .@j$[0], atoi(.@j$[1]), atoi(.@j$[2]);
   } else
       message strcharinfo(0),"Invalid map.";
   end;

Item type 11.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

what command I use to call this scrip, sc_start?

Could you tell me how to do it? or a page that teaches, I not found..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

That's an item script. Either condense it into 1 line or make it a function.

Custom_Items

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

I did it

function	script	scrollwarpzz	{
message strcharinfo(0),"Teleport to...";
dispbottom "map,x,y";
input .@i$;
explode(.@j$,.@i$,",");
if (getmapusers(.@j$[0]) >= 0) {
	delitem your_item,12219;
	warp .@j$[0], atoi(.@j$[1]), atoi(.@j$[2]);
} else
	message strcharinfo(0),"Invalid map.";
end;
}

and in the script item:

{ callfunc "scrollwarpzz"; }

item type 11,

why do not works ?

Edited by nunesb
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

delitem 12219,1;

Other than that, works for me.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  11/30/12
  • Last Seen:  

works now

thanks

Edited by nunesb
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

http://www.eathena.ws/board/index.php?s=&showtopic=238404&view=findpost&p=1500001

updating this script

function    script    tele_device    {
if ( getmapflag( strcharinfo(3), mf_nowarp ) ) {
	dispbottom "Teleport Device : you can't use this device on this map";
	end;
}
if ( input( .@input$, 4, 21 ) ) {
	dispbottom "Teleport Device : invalid string length";
	end;
}
if ( sscanf( .@input$, "%15s %d %d", .@map$, .@x, .@y ) < 3 ) {
	if ( sscanf( .@input$, "%15[^,],%d,%d", .@map$, .@x, .@y ) < 1 ) {
		dispbottom "Teleport Device : invalid format. Usage: <mapname> <x> <y>";
		end;
	}
}
if ( getmapusers( .@map$ ) == -1 ) {
	dispbottom "Teleport Device : no such map";
	end;
}
if ( getmapflag( .@map$, mf_nowarpto ) ) {
	dispbottom "Teleport Device : you can't warp to this map";
	end;
}
if ( ( .@x || .@y ) && checkcell( .@map$, .@x, .@y, cell_chknopass ) ) {
	dispbottom "Teleport Device : invalid coordinate";
	end;
}
//	delitem 10000,1; // uncomment this for limited use
warp .@map$, .@x, .@y;
end;
}

but this sscanf post out some !@# error when user input invalid format <.<

dunno but somehow I want to file a report for it

http://rathena.org/board/tracker/issue-7059-sscanf-script-command-display-error-in-map-server/

EDIT: and I want to edit this script somemore =/

done ...

EDITED again <.< this time follows the atcommand.c

Edited by AnnieRuru
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...