SphereCommunity
Join Guild via Menu WITH toggle on *SOLVED* - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Join Guild via Menu WITH toggle on *SOLVED* (/Thread-Join-Guild-via-Menu-WITH-toggle-on-SOLVED)



Join Guild via Menu WITH toggle on *SOLVED* - x77x - 01-02-2015 08:38 AM

how can i get players to join a guild using a menu and NOT have to be accepted by the guildmaster.... an easy force WITH TOGGLE ON =)
(or a way to force toggle on for everyone, if your in a guild its always there no matter what)


Code:
[MENU MENU_JOIN_WEI]
Welcome <Name>, Do you wish to join the army of Wei?
ON=0 I confess my loyalty to the Army of Wei and declare Lord Cao Cao my master.
CONFIRM_WEI
ON=0 No
SRC.SYSMESSAGE You decided not to join...

[MENU CONFIRM_WEI]
Are you sure you wish to join the Army of Wei?
ON=0 Yes
JOINWEI
ON=0 No
SRC.SYSMESSAGE You decided not to join...

[FUNCTION JOINWEI]

SRC.TAG.ARMY WEI
SRC.SYSMESSAGE Congtatulations, You have joined the mighty army of Wei!
SRC.GO xxxx,xxx


this is what the guildstone looks like in sphereworld.scp
Code:
[WORLDITEM i_guildstone]
SERIAL=040001fdc
NAME=Wei
COLOR=04
TAG.changeabbrev_time=066eeae
P=5136,1767
ALIGN=0
ABBREV=Wei
MEMBER=01ffd,,2,01ffd,1,1,0 <--guildmaster with toggle on
MEMBER=040001fd3,,100,00,1,1,0 <--guild at war with
MEMBER=040001fca,,100,00,1,1,0 <--guild at war with

and the memory item on the guildmaster
Code:
[WORLDITEM i_memory]
SERIAL=040001fdb
COLOR=0400
TIMESTAMP=697036
LINK=040001fdc
ATTR=04
MOREP=5137,1766
LAYER=30
CONT=01ffd

ideas?


RE: Join Guild via Menu WITH toggle on - x77x - 01-03-2015 04:15 AM

like trying to find the actual guildstone and add a member via script...


Code:
[FUNCTION JOINWEI]
<finduid.040001fdc>MEMBER=<SRC.UID>,,<SRC.UID>,1,1,0
SRC.TAG.ARMY WEI
SRC.SYSMESSAGE Congtatulations, You have joined the mighty army of Wei!
SRC.GO xxxx,xxx


knowwhatimsayin?


RE: Join Guild via Menu WITH toggle on - x77x - 01-04-2015 02:49 PM

BAM!!! figured it out...


Code:
[FUNCTION JOINWEI]
OBJ <UID.040001fdc>
OBJ.MEMBER=<SRC.UID>,,2,<SRC.UID>,1,1,0
SRC.TAG.ARMY WEI
SRC.SYSMESSAGE Congtatulations, You have joined the mighty army of Wei!
SRC.GO xxxx,xxx



in theory...
i bet you could do this to NPCs as well
because they are linked to the guildstone without the memory item


RE: Join Guild via Menu WITH toggle on *SOLVED* - Ben - 01-05-2015 03:34 AM

you could have used the JOINASMEMBER guild stone function. so in your case OBJ.JOINASMEMBER <SRC.UID> but it won't allow NPCs to join.
Another thing, it's not necessary to use SRC everywhere, actually, it's recommended not to. Depending from where you call this function, SRC may not always be your intended reference. Specially in a function, it is best to use the default object [ ] or [I] and call the function with the reference that is needed.


RE: Join Guild via Menu WITH toggle on *SOLVED* - x77x - 01-05-2015 06:46 AM

example please...


RE: Join Guild via Menu WITH toggle on *SOLVED* - Extreme - 01-05-2015 06:52 AM

It's already explained and have an example...


RE: Join Guild via Menu WITH toggle on *SOLVED* - x77x - 01-05-2015 09:38 AM

so....?

[FUNCTION JOINWEI]
OBJ <UID.040001fdc>
OBJ.JOINASMEMBER <SRC.UID>
SRC.TAG.ARMY WEI
SRC.SYSMESSAGE Congtatulations, You have joined the mighty army of Wei!
SRC.GO xxxx,xxx

i dont understand what Ben was saying...
i was asking to show me how he suggests the cleanest way to do it is
learn through example

extreme, dont bother answering if you dont have anything productive to say...
you may understand it, but i dont


RE: Join Guild via Menu WITH toggle on *SOLVED* - Extreme - 01-05-2015 09:39 PM

Just stop trying the impossible.
I said you can't insert npcs on guilds, Ben either.


RE: Join Guild via Menu WITH toggle on *SOLVED* - x77x - 01-05-2015 10:06 PM

the above is for PLAYERS...