Jump to content
  • 0

Need help in Item Require Warper


lolmin21

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  11/24/13
  • Last Seen:  

Need help in this script

trinity,118,66,4	script	Test1	435,{

	mes "[Test]";
	mes "Nice to meet you "+ strcharinfo ( 0 ) +", my name is Ana";
	mes "Welcome to ^E066FFthis RO!^000000";
	mes "I'll help you out I'd like to warp you here";
next;
	mes "This is following item to warp";
	mes "10 Gold";

// Take Locations
	setarray .@maps$[0],"Prontera","Morocc","Geffen","Izlude";
	setarray .@mapx[0],158,100,200,300;
	setarray .@mapy[0],174,100,200,300;

// Set Items Needed
	setarray .@items,501,502,503,504; 

// Generate Menu
	for (set .@a, 0; .@a < getarraysize(.@maps$); set .@a, .@a + 1) {
  	if (countitem(.@items[.@a])) {
    	set .@menu_maps$[getarraysize(.@menu_maps$)], .@maps$[.@a];
    	set .@menu_index[getarraysize(.@menu_index)], .@a;
  }
}  

// Generate the Menu String
	set .@menu$, .@menu_maps$[0];
	for (set .@a, 1; .@a < getarraysize(.@menu_maps$); set .@a, .@a + 1) {
  	set .@menu$, .@menu$ + ":" + .@menu_maps$[.@a];
}

// Query Selection
	set .@a, select(.@menu$) - 1; 

	warp .@menu_maps$[.@a], .@mapx[.@a], .@mapy[.@a];
	end;

}

Debug & Error
g6rb.jpg

 

 

Features Script:
-Require Item Quest

-Only 1 time use item required(first time only, next free)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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

[paste=74qo3zp6a878]

if I understand correctly ...

you trying to use 1 item to unlock the map

but once the map is unlock, the script will open the map indefinitely

this will require to set a permanent player variable in bits ...

because in the script, it lacks this feature

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Change 

warp .@menu_maps$[.@a], .@mapx[.@a], .@mapy[.@a];

to :

warp strtolower(.@menu_maps$[.@a]), .@mapx[.@a], .@mapy[.@a];
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  11/24/13
  • Last Seen:  

Still error, cannot click the npc.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  11/24/13
  • Last Seen:  

Thank you

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