Jump to content
  • 0

Disable mount on Prontera


Question

Posted (edited)

Can anybody make script for this?

--Can't use Reins of Mounts when in Prontera

--When mounted(Reins of Mounts) on other map then warps to Prontera it automatically unmount.

Edited by rkhin28

17 answers to this question

Recommended Posts

Posted

It's not working :/ I accidentally put setmounting(); below OnPCLoadMapEvent that's why I said it's working but there's a problem with it. If they are not on mount and when they go to Prontera they are already mounted and when they type @go 0 again the mount disappear. Any ideas?

I thought you wanted mounts to be disabled in Prontera? Whenever someone goes to Prontera, the script removes their mount no matter what.

To disable Reins of Mount from being used in Prontera edit the script in the item_db entry to this:

if (strcharinfo(3) != prontera) { setmounting(); }

  • 1
Posted (edited)

- script no_reins2 -1,{
OnPCLoadMapEvent:
if (strcharinfo(3) == prontera && ismounting() ) { setmounting(); }
}
prontera mapflag loadevent

That should work now. I found the documentation for it.

http://rathena.org/w...untingNPCHandle

Thanks for the help. It's working now :D Thanks again :)

**EDIT**

It's not working :/ I accidentally put setmounting(); below OnPCLoadMapEvent that's why I said it's working but there's a problem with it. If they are not on mount and when they go to Prontera they are already mounted and when they type @go 0 again the mount disappear. Any ideas?

Edited by rkhin28
  • Upvote 1
Posted

Something along this lines

OnPCLoadMapEvent:
if (strcharinfo(3) == prontera) { setmounting(0); }
end;

Double check on prontera if it needs " " or not.

Do note:

OnPCLoadMapEvent:
This special label will trigger once a player steps in a map marked with the
'loadevent' mapflag and attach its RID. The fact that this label requires a
mapflag for it to work is because, otherwise, it'd be server-wide and trigger
every time a player would change maps. Imagine the server load with 1,000 players
(oh the pain...)

Posted

Something along this lines

OnPCLoadMapEvent:
if (strcharinfo(3) == prontera) { setmounting(0); }
end;

Double check on prontera if it needs " " or not.

Do note:

OnPCLoadMapEvent:
This special label will trigger once a player steps in a map marked with the
'loadevent' mapflag and attach its RID. The fact that this label requires a
mapflag for it to work is because, otherwise, it'd be server-wide and trigger
every time a player would change maps. Imagine the server load with 1,000 players
(oh the pain...)

Where should I put this one?

Posted (edited)

Make it into a full script, you only need to add two lines, and load it into the server.

I've got this error btw

script error on npc/own/mapflags/no_reins2.txt line 4
parse_line: need ';'
 1 : {
 2 : OnPCLoadMapEvent:
 3 :   setmounting();
*    4 :   if (strcharinfo(3) == prontera) {  setmounting'('0); }
    5 :   end;
    6 : }
    7 : prontera mapflag loadevent

Edited by rkhin28
Posted

Odd...guess it doesn't work the same way as setriding... There's no documentation for setmounting so I'm just guessing everything.

Try this instead

OnPCLoadMapEvent:
if (strcharinfo(3) == prontera && checkmounting() == 1 ) { setmounting(); }
end;

Posted

Got a new error XD

   parse_simpleexpr: unmatch ')'
 1 : {
 2 : OnPCLoadMapEvent:
 3 :   setmounting();
*    4 :	 if (strcharinfo(3) == prontera && checkmounting'(') == 1 ) { setmounting(); }
 5 : }
 6 : prontera mapflag loadevent

Posted

Here's the whole script.

- script no_reins2 -1,{
OnPCLoadMapEvent:
 setmounting();
   if (strcharinfo(3) == prontera && checkmounting() == 1 ) { setmounting(); }
}
prontera mapflag loadevent

Posted (edited)

Yeah I wanted to disable mounts on Prontera but it doesn't work. The script don't remove the mount when somebody goes to Prontera.

12622,Reins_Of_Mount,Reins Of Mount,11,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if (strcharinfo(3) != prontera) { setmounting(); } },{},{}

^I can't use Reins of Mount

Edited by rkhin28

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...