Jump to content
  • 0

Simple Warper Script - Help!


Loowiz

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/08/22
  • Last Seen:  

Hello! I'm pretty new to scripting, and have shamelessly trying to create my own warper NPC by reading other scripts and trying to understand how to do it.

However, for some reason, the script doesn't work, and the NPC never appears. Can anyone show me where have I made a mistake?

Thanks. Here's the script:

 

payon,163,96,4    script    Warp Man    617,{

    mes "[Warp Man]";
    mes "Greetings. I can teleport you to the main cities of Midgard";
    mes "Where would you like to go?";

    switch(select("- Payon:- Prontera:- Morocc:- Geffen:- Al De Baran:- Exit"))
    {
        case 1:
            warp "payon",163,88;
            end;
        case 2:
            warp "prontera",116,72;
            end;
        case 3:
            warp "morocc",158,94;
            end;
        case 4:
            warp "geffen",120,39;
            end;
        case 5:
            warp "aldebaran,140,115;
            end;
        case 6:
            close;
    }
}

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  163
  • Reputation:   62
  • Joined:  07/11/14
  • Last Seen:  

are you loading the code correctly in the emulator?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/08/22
  • Last Seen:  

1 minute ago, Hyroshima said:

are you loading the code correctly in the emulator?

Honestly, I have no idea. Just created the script on an already existing .txt, in the NPC folder.

I did create a "Reset Stats" NPC in the same .txt, and it worked flawlessly.

Maybe it has to go in a different folder, but I really can't tell.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   25
  • Joined:  12/24/14
  • Last Seen:  

Spoiler
payon,163,96,4	script	Warp Man	617,{
	mes "[ Warp Man ]";
	mes "Greetings. I can teleport you to the main cities of Midgard";
	mes "Where would you like to go?";
	switch(select("- Payon:- Prontera:- Morocc:- Geffen:- Al De Baran:- Exit")) {
		case 1:
			warp "payon",163,88;
			end;
		case 2:
			warp "prontera",116,72;
			end;
		case 3:
			warp "morocc",158,94;
			end;
		case 4:
			warp "geffen",120,39;
			end;
		case 5:
			warp "aldebaran,140,115;
			end;
		case 6:
			close;
	}
	end;
}

 

Follow this Step

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/08/22
  • Last Seen:  

5 hours ago, mR L said:
  Reveal hidden contents
payon,163,96,4	script	Warp Man	617,{
	mes "[ Warp Man ]";
	mes "Greetings. I can teleport you to the main cities of Midgard";
	mes "Where would you like to go?";
	switch(select("- Payon:- Prontera:- Morocc:- Geffen:- Al De Baran:- Exit")) {
		case 1:
			warp "payon",163,88;
			end;
		case 2:
			warp "prontera",116,72;
			end;
		case 3:
			warp "morocc",158,94;
			end;
		case 4:
			warp "geffen",120,39;
			end;
		case 5:
			warp "aldebaran,140,115;
			end;
		case 6:
			close;
	}
	end;
}

 

Follow this Step

The thing is, I already loaded it in the game. If I just use the
 

payon,163,96,4    script    Warp Man    617,{
 }

 

it actually loads an empty NPC. The issue comes when I add the rest of the script... then the NPC disappears.

Thanks for the video, though, it made my folders a little bit more organized.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/08/22
  • Last Seen:  

6 hours ago, Loowiz said:

The thing is, I already loaded it in the game. If I just use the
 

payon,163,96,4    script    Warp Man    617,{
 }

 

it actually loads an empty NPC. The issue comes when I add the rest of the script... then the NPC disappears.

Thanks for the video, though, it made my folders a little bit more organized.

I managed to fix it by myself. To anyone wondering, here's the final and working version of the script.

 

payon,163,96,4    script    Warp Man#pay    617,{
    mes "[Warp Man]";
    mes "Greetings. I can teleport you to the main cities of Midgard";
    mes "Where would you like to go?";
    switch(select("- Payon:- Prontera:- Morocc:- Geffen:- Al De Baran:- Exit")) {
    case 1:
        warp "payon",163,88;
        end;
    case 2:
        warp "prontera",116,72;
        end;
    case 3:
        warp "morocc",158,94;
        end;
    case 4:
        warp "geffen",120,39;
        end;
    case 5:
        warp "aldebaran",140,115;
        end;
    case 6:
        close;
    }
}

 

Basically I was missing a " after 'aldebaran', and the cases column had to be the same as the switch menu's.

Thread closed.

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