Jump to content
  • 0

[solved] Add Zeny Cost to Custom Warper


jamesandrew

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.07
  • Content Count:  58
  • Reputation:   3
  • Joined:  06/21/23
  • Last Seen:  

I need help changing the default rathena custom warper. I want to add a 1.000 zeny cost for level 50 and above but keep it free for levels below 50.
https://github.com/rathena/rathena/blob/8740574ae349e516c5d3914bfaf13db13539327e/npc/custom/warper.txt#L19

Edited by jamesandrew
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.05
  • Content Count:  45
  • Reputation:   25
  • Joined:  09/09/23
  • Last Seen:  

You can add your checks here

function Go {
	set lastwarp$, getarg(0);
	set lastwarpx, getarg(1,0);
	set lastwarpy, getarg(2,0);
	if(BaseLevel > 50 && Zeny < 1000){
    	mes "You need 1,000 Zeny.";
		close;
    }
    if(BaseLevel > 50) Zeny -= 1000;
	warp getarg(0),getarg(1,0),getarg(2,0);
	end;
}

 

Edited by Nyaniverse
edit snippet
  • Upvote 1
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

Add set zeny then add condition statement

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