Jump to content
  • 0

Request for Warper NPC making it free for VIPs


kittypryde

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.01
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/11/24
  • Last Seen:  

Hello I'm using this warper npc script: https://github.com/rathena/rathena/blob/master/npc/custom/warper.txt

I'd like to seek assistance with modifying the script so that the town warps will cost 2,000 zeny and the dungeon warps will cost 5,000 zeny. Also I'd like to know how to make it free for VIPs.

I was able to put town warp cost by adding this:

function Go {
	if (select("Pay 20k Zeny", "Cancel") == 2) close3;
	if (Zeny < 20000) {
		mes "You don't have enough Zeny.";
		close3;
	}
	Zeny -= 20000;
	close2;
	set lastwarp$, getarg(0);
	set lastwarpx, getarg(1,0);
	set lastwarpy, getarg(2,0);
	warp getarg(0),getarg(1,0),getarg(2,0);
	end;
}

But I'd like to know how I can make it so that dungeon warps will cost 5,000 zeny. And is there any modification to the script that will make it so that all dungeon warps will be redirected to only 1st floor of the dungeon?

 

Thank you.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  1281
  • Reputation:   170
  • Joined:  06/12/12
  • Last Seen:  

2 hours ago, kittypryde said:

Hello I'm using this warper npc script: https://github.com/rathena/rathena/blob/master/npc/custom/warper.txt

I'd like to seek assistance with modifying the script so that the town warps will cost 2,000 zeny and the dungeon warps will cost 5,000 zeny. Also I'd like to know how to make it free for VIPs.

I was able to put town warp cost by adding this:

function Go {
	if (select("Pay 20k Zeny", "Cancel") == 2) close3;
	if (Zeny < 20000) {
		mes "You don't have enough Zeny.";
		close3;
	}
	Zeny -= 20000;
	close2;
	set lastwarp$, getarg(0);
	set lastwarpx, getarg(1,0);
	set lastwarpy, getarg(2,0);
	warp getarg(0),getarg(1,0),getarg(2,0);
	end;
}

But I'd like to know how I can make it so that dungeon warps will cost 5,000 zeny. And is there any modification to the script that will make it so that all dungeon warps will be redirected to only 1st floor of the dungeon?

 

Thank you.

For this part "s there any modification to the script that will make it so that all dungeon warps will be redirected to only 1st floor of the dungeon?"

OnInit:
	OnTimer0050:
		showscript "Warper & Storage", getnpcid(0);
		initnpctimer;
	.Satan_Morocc = true;	//	false will enable moc_fild 4,5,6,8,9,10,14,15 while disable moc_fild 20,21,22 Default is true.
	.OnlyFirstFld = false;	//	true will teleport to the first level of the Fields  Default is false.
	.OnlyFirstDun = false;	//	true will teleport to the first level of the Dungeons  Default is false.

set .OnlyFirstDun into true

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