L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check masterparty
Author Message
benbt91 Offline
VIP Member
***

Posts: 694
Joined: Mar 2012
Reputation: 47
Version: 1.4.3.143
Post: #1
Question Check masterparty

Anyone know how can check master party ?

something like this :

    LUA Programming
function IsPartyLeader()
       PartyLeader = (GetPartyMaster():GetName());
       me = (GetMe():GetName());
end;
 
if PartyLeader == me then
-- do something
elseif not PartyLeader == me then
-- do something
end;


and i know this code not right Big Grin someone can help me fix it ? Big Grin
(This post was last modified: 09-04-2014 13:13 PM by benbt91.)
09-04-2014 13:12 PM
Find all posts by this user Quote this message in a reply
kerberos464 Offline
Bug revealer

Posts: 1,538
Joined: Jun 2012
Reputation: 576
Version: 1.4.3.143
Post: #2
RE: Check masterparty

GetMe():IsMyPartyMemberMaster()

Everything is possible. The impossible just takes longer.
09-04-2014 16:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
 Reputed by : benbt91(+2)
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #3
RE: Check masterparty

Test Script: IsMyPartyMemberMaster()

    LUA Programming
-- LUA: Test: Party Master in L2Tower
-- R: Im party master if I make the party or Im Solo.
repeat
		me = GetMe(); -- Global
		if (me:IsMyPartyMemberMaster()) then
			ShowToClient("SYS","im the Party Master");
		else
			ShowToClient("SYS","im NOT Party Master");
		end;
		Sleep(60*1000); -- 1 min
until false;

09-05-2014 07:30 AM
Find all posts by this user Quote this message in a reply
 Reputed by : benbt91(+2)
benbt91 Offline
VIP Member
***

Posts: 694
Joined: Mar 2012
Reputation: 47
Version: 1.4.3.143
Post: #4
RE: Check masterparty

(09-04-2014 16:20 PM)kerberos464 Wrote:  GetMe():IsMyPartyMemberMaster()

(09-05-2014 07:30 AM)rORUMI Wrote:  Test Script: IsMyPartyMemberMaster()

    LUA Programming
-- LUA: Test: Party Master in L2Tower
-- R: Im party master if I make the party or Im Solo.
repeat
		me = GetMe(); -- Global
		if (me:IsMyPartyMemberMaster()) then
			ShowToClient("SYS","im the Party Master");
		else
			ShowToClient("SYS","im NOT Party Master");
		end;
		Sleep(60*1000); -- 1 min
until false;


ty both of pro ! But i have i problem is :
    LUA Programming
GetMe():IsMyPartyMemberMaster()


how i can set with unlimit range ? Big Grin because i tested 1 char at town and 1 char at farm spot then it get erro !!
09-05-2014 11:21 AM
Find all posts by this user Quote this message in a reply
kerberos464 Offline
Bug revealer

Posts: 1,538
Joined: Jun 2012
Reputation: 576
Version: 1.4.3.143
Post: #5
RE: Check masterparty

you have to ask in first post what you were really need.
for checking "myself" you don't need range.

if you need check for every party member, enumerate them with GetPartyList(), then check every member

Everything is possible. The impossible just takes longer.
09-05-2014 11:25 AM
Visit this user's website Find all posts by this user Quote this message in a reply
 Reputed by : benbt91(+2)
benbt91 Offline
VIP Member
***

Posts: 694
Joined: Mar 2012
Reputation: 47
Version: 1.4.3.143
Post: #6
RE: Check masterparty

(09-05-2014 11:25 AM)kerberos464 Wrote:  you have to ask in first post what you were really need.
for checking "myself" you don't need range.

if you need check for every party member, enumerate them with GetPartyList(), then check every member
thnks Kerberos and sorry ^^ i just get this erro after u gave me a suggest Big Grin !

No i just need check another member in party ( just 1 is enough )
i did use
    LUA Programming
(GetMe():GetRangeTo(Charname)< 50000 )


but still get erro Big Grin
(This post was last modified: 09-05-2014 12:54 PM by benbt91.)
09-05-2014 12:52 PM
Find all posts by this user Quote this message in a reply
kerberos464 Offline
Bug revealer

Posts: 1,538
Joined: Jun 2012
Reputation: 576
Version: 1.4.3.143
Post: #7
RE: Check masterparty

compare your request with your initial request in first topic.

Everything is possible. The impossible just takes longer.
09-05-2014 12:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #8
RE: Check masterparty

(09-05-2014 11:25 AM)kerberos464 Wrote:  if you need check for every party member, enumerate them with GetPartyList(), then check every member

    LUA Programming
partylist = GetPartyList(); -- Global
 for partylist in partylist.list do -- R: ??



Kerberos, what type(s) of result we get from this list?, a number, a Id of char? I try to showme "partylist" result but i cant.. and More important, Im part of this party.list? If we are 7, party.list tellme about the other 6 chars, o im include?

and last, partylist.list, include me if im at solo, with no party, like a the "only" member of a party or not.

ty
(This post was last modified: 09-05-2014 22:00 PM by rORUMI.)
09-05-2014 21:55 PM
Find all posts by this user Quote this message in a reply
kerberos464 Offline
Bug revealer

Posts: 1,538
Joined: Jun 2012
Reputation: 576
Version: 1.4.3.143
Post: #9
RE: Check masterparty

partylist is userdata object
you can do check as following:
partylist:IsMyPartyMemberMaster()

Everything is possible. The impossible just takes longer.
09-05-2014 21:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #10
RE: Check masterparty

Ok, from the userdata object we obtain the .list in this case. its mean that i can covine it with another user data, like partylist.GetTarget() or partylist.IsPvPFlag() or partylist.IsUsingMagic() to check fast conditions in the party and take actions?
(This post was last modified: 09-05-2014 22:13 PM by rORUMI.)
09-05-2014 22:13 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  check l2 deathwhisper truthak0s69 0 1,883 11-07-2016 23:40 PM
Last Post: truthak0s69
  Free Check EXP to Town Script!!!!!!!!!!!!!!!!! soul2eat 7 5,184 12-23-2014 15:24 PM
Last Post: TheQQmaster
  check ss atrivido1 5 4,393 08-20-2014 01:02 AM
Last Post: tophersoccer
Exclamation check weapon/gear KristalSystem 4 3,571 07-06-2014 00:10 AM
Last Post: KristalSystem
  How i can check "on/off" some scripts? hcetigol 2 2,625 05-22-2014 18:27 PM
Last Post: hcetigol
  How do check mobs or me in side polyin by script? haolong5 0 1,898 02-20-2014 18:21 PM
Last Post: haolong5
  L2 neo guys check it pasxalis891 0 2,507 01-14-2014 23:13 PM
Last Post: pasxalis891
  Character Class check Lordbl4 3 3,995 01-10-2014 20:13 PM
Last Post: SimonHM
  New Update, New Problem - Please Check vingz 23 12,666 08-18-2013 13:11 PM
Last Post: vexara
  Check it it's important please. OneManAmry 5 4,079 09-30-2012 16:35 PM
Last Post: dcsilviu89



User(s) browsing this thread: 1 Guest(s)