Jump to content

Question

10 answers to this question

Recommended Posts

Posted
* getcharid <type>{,"character name"};

This function will return a unique ID number of the invoking character, or, if a
character name is specified, of that character.
Type is the kind of associated ID number required:
0 - Character ID number.
1 - Party ID number.
2 - Guild ID number.
3 - Account ID number.

if (getcharid(2)) mes "Only members of a guild are allowed beyond this point!";

Posted

Noooo, I mean when player use /breakguild <guild_name> command, how to get guild_id? cuz i will use guild_id when OnBreakGuild working

In agit_template have OnBreakGuild Event when guildmaster breakguild this event will working for abandon castle if they have a castle

Posted

try working around getcastledata and setcastledata

make a guild or something then get the guild_id from your sql guild table

add in db/castle_db.txt:

100,prontera,My House,test,1

- script test -1,{
OnInit: // just for testing initialize the owner of the house or something
setcastledata ("prontera",1,<put guild_id here>);
end;
OnGuildBreak:
set .@guildid, getcastledata("prontera",1);
announce "Guild ID is : "+.@guildid,0;
end;
}

Posted

You can't trigger guild break if your not adding the map to the castle database

// Guild Castles Database
//
// Structure of Database:
// CastleID,MapName,CastleName,OnGuildBreakEventName,Flag
//
// 01. CastleID				 Unique ID of the castle. Must remain unique across all map-servers.
// 02. MapName				  Map name to be considered as the castle map.
// 03. CastleName			   Name of the castle (used by scripts and guardian name tags).
// 04. OnGuildBreakEventName    NPC unique name to invoke ::OnGuildBreak on, when a occupied
//							  castle is abandoned during guild break.
// 05. Flag					 Switch flag (reserved as of athena-dev mod0796~0801, not used by server).

Posted (edited)

add in db/castle_db.txt:

100,prontera,My House,test,1

- script test -1,{
OnInit: // just for testing initialize the owner of the house or something
setcastledata ("prontera",1,<put guild_id here>);
end;
OnGuildBreak:
set .@guildid, getcastledata("prontera",1);
announce "Guild ID is : "+.@guildid,0;
end;
}

100,rent1,House Rent,Flag#rent1,1

-<tab>script<tab>Rent::Rent<tab>-1,{
end;
OnGuildBreak:
announce "Some word",0;
end;
}

rent1,100,100,0<tab>duplicate(Rent)<tab>Flag#rent1<tab>-1

OnInit:
setcastledata x,x,x;
end;

I do all above but script not announce when break guild. :)

Edited by Mechomorph XD
Posted

100,rent1,House Rent,Flag#rent1,1 is the npc to trigger onguildbreak

and in your npc the name is Rent::Rent thats why it cant find the npc

while rent1,100,100,0<tab>duplicate(Rent)<tab>Flag#rent1<tab>-1 is just an alias for the npc named Rent,

you should changed main npc name to make it to work

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...