Jump to content
  • 0

Item Script


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

hello i like to ask

item script like this

@guildrecall Following Leader Guild

Example

PlayerName(Papa) when he click the scroll all guild member will recall at the place prontera,150,150

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   19
  • Joined:  06/15/12
  • Last Seen:  

Not too sure as I am a newb @ scripting but can´t you make a function like:

function script F_GRecall -1,{

input @guild$;

atcommand "@guildrecall "+@guild$;

and the item

callfunc "F_GRecall";

? try that xD *unsure looking*

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

callfunc "Sample";

function script Sample {
getmapxy( .@Map$,.@X,.@Y,0 );
if( getcharid(2) ){
warpguild .@Map$,.@X,.@Y,getcharid(2);
announce "Player("+strcharinfo(0)+") clicked the scroll and recall his guild.",0;
}
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   19
  • Joined:  06/15/12
  • Last Seen:  

I just noticed a heavy flaw in my function....

i could have recalled every guild ;DDDD

But well only if it worked... but i doubt that somehow after I looked at Emistry´s script XDD .... *I cantz script*

Edited by Ainna
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Your's will work too Aima don't worry. just use strcharinfo(2) for guildname instead asking for input.

If no guild found cause he ain't got none, atcommand will display "Please, enter a guild name/id (usage: @guildrecall <guild_name/id>)." so it's safe but you may add a check like Emistry to change this message.

Btw on Emistry code getmapxy may be done after the getcharid(2) check since it's pointless to do it if the char has no guild, also it's better that function use return at the end if you want to use them in longer script.

Now quick note about mapflag :

warpguild is checking for : nowarp, and noreturn. (with m,x,y option)

guilrecall is cheking for : nowarpto, and nowarp both bypassable by PC_PERM_WARP_ANYWHERE

And lastly I don't know if you wanted to be excluvise to guild leader but it's not at the moment.

(You'll need to add something like : if(getguildmasterid(getcharid(2)) == getcharid(0) ) //i'm gm if true)

Oh also idk if you wanted your item to be consomable but if so you will lose it when it fail du to mapflag or no guild wich is quite sad.

Edited by Lighta
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   19
  • Joined:  06/15/12
  • Last Seen:  

Thanks for the clarification Lighta ^^

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