PapaZola Posted July 3, 2012 Posted July 3, 2012 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 Quote
Wafflebutt Posted July 3, 2012 Posted July 3, 2012 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* 1 Quote
Emistry Posted July 3, 2012 Posted July 3, 2012 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; } Quote
Wafflebutt Posted July 3, 2012 Posted July 3, 2012 (edited) 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 July 3, 2012 by Ainna Quote
Lighta Posted July 3, 2012 Posted July 3, 2012 (edited) 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 July 3, 2012 by Lighta Quote
Question
PapaZola
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
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.