Jump to content
  • 0

how to make 3 different statuses


Question

Posted

the idea i have in my head is that a player who gets a 100pvp points gets status number1 200 pvp number 2 ant 300number 3.Every status gives player different stats like p def,mdef ant stuff like that more cp and hp mabye.an oposite of that comes with pk points but different stats.more to it i want to make the apela armoras wearable only by players who have status 3 pvp or pk.A player who has 100pvp points is granted with pvp status and cannot get status from pk points,i hope you understand what i want to do,could someone help me with this? :)

 

9 answers to this question

Recommended Posts

  • 0
Posted

so 1. wrong section

and coz i dont want to get -1 karma:

make new int and name it status, set it to 0

create method getstatus and setstatus

in setstatus make something like:

if(activeChar.getPvpKills>100&&activeChar.getPvpKills<201)

status = 1

else if(activeChar.getPvpKills>200&&activeChar.getPvpKills<301)

status = 2

etc

in useItem add something like

if(_itemid == idofapella && activeChar.getstatus<3){

activeChar.sendMessage("You have got too low status);

return;

}

i dont really remember methods like sethp setmdef or something so look for it in the source

 

Edit:

:S i would forget, in increasepvpkills write setstatus() and also in enterworld :)

  • 0
Posted

sorry i tough it was the right section,my bad. thanks i'l try but it still sounds a bit difficult :D

ok i will write it for you.. just tell me id of that armor parts

  • 0
Posted

add this in l2pcinstance

private int status = 0;
public int getPvPStatus(){
	return status;
}
public void setPvPStatus(){
	for(int i = 5000;i>=100;i-=100)
		if(getPvpKills()>i&&getPvpKills()<(i+101)){
			status = i/100;
			break;
		}
}

i think it should work well but i didnt test it

also in useItem after

if (item.isEquipable())

{

add:

		if(_itemId == itemid &&activeChar.getPvPStatus()<3)
			break;

and in increasepvpkills in l2pcinstnace add setPvPStatus() and in enterworld, write activeChar.setPvPStatus()

 

Edit: sorry for double post, didnt see it..

  • 0
Posted

for pk status just copy what i wrote for you but with pk, like private int pkStatus = 0, getPkStatus, and setPkStatus, there you need to change getPvpKills() to getPkKills(), later just add setPkStatus to enterworld and method which is increasing pk points and its done. You can make a lot of things with that like for example players can join olympiad only if they have 2 status or more or enter custom farm zone with 3 status or using bsoe only if they have 3 status, just use your imagination and brain which is most important :)

  • 0
Posted

thanks mate. ;) i will try :D how to give someone +1 karma?

 

You have to be staff member or VIP to give karma.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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