AnnieRuru
~~Cute~Cute~Scripter~~
- Messages
- 1,677
- Points
- 0
- Location
- your next door ~
- Discord
- AnnieRuru#1609
- Github
- AnnieRuru
- Emulator
- Client Version
- 2019-05-30aRagexeRE
yesterday @@Aeromesi asked in IRC about is there a script commands to prevent the player to attack
makes me remember I did something similar before
https://rathena.org/board/topic/91115-event-watcher/?p=238849
yes, we really need to have these script commands
*pcblockmove has already existed for ages, which meant for block players from moving
but we are missing out commands to block players from attacking and chat
.
.
I made this patch
http://upaste.me/870121811d11a19ff
it looks clean
I think this should go inside hercules as default
EDIT: tested with
prontera,154,185,5 script can attack 1_F_MARIA,{ pcblockattack getcharid(3), 0;}prontera,157,185,5 script no attack 1_F_MARIA,{ pcblockattack getcharid(3), 1;}prontera,154,181,5 script can chat 1_F_MARIA,{ pcblockchat getcharid(3), 0;}prontera,157,181,5 script no chat 1_F_MARIA,{ pcblockchat getcharid(3), 1;}prontera,154,177,5 script vulnerable 1_F_MARIA,{ pcimmune getcharid(3), 0;}prontera,157,177,5 script immune 1_F_MARIA,{ pcimmune getcharid(3), 1;}prontera,154,173,5 script can skill 1_F_MARIA,{ pcblockskill getcharid(3), 0;}prontera,157,173,5 script no skill 1_F_MARIA,{ pcblockskill getcharid(3), 1;}.EDIT2:
*pcimmune is equivalent to @monsterignore
I just don't like using *atcommand in scripts
makes me remember I did something similar before
https://rathena.org/board/topic/91115-event-watcher/?p=238849
yes, we really need to have these script commands
*pcblockmove has already existed for ages, which meant for block players from moving
but we are missing out commands to block players from attacking and chat
.
.
I made this patch
http://upaste.me/870121811d11a19ff
it looks clean
I think this should go inside hercules as default
EDIT: tested with
prontera,154,185,5 script can attack 1_F_MARIA,{ pcblockattack getcharid(3), 0;}prontera,157,185,5 script no attack 1_F_MARIA,{ pcblockattack getcharid(3), 1;}prontera,154,181,5 script can chat 1_F_MARIA,{ pcblockchat getcharid(3), 0;}prontera,157,181,5 script no chat 1_F_MARIA,{ pcblockchat getcharid(3), 1;}prontera,154,177,5 script vulnerable 1_F_MARIA,{ pcimmune getcharid(3), 0;}prontera,157,177,5 script immune 1_F_MARIA,{ pcimmune getcharid(3), 1;}prontera,154,173,5 script can skill 1_F_MARIA,{ pcblockskill getcharid(3), 0;}prontera,157,173,5 script no skill 1_F_MARIA,{ pcblockskill getcharid(3), 1;}.EDIT2:
*pcimmune is equivalent to @monsterignore
I just don't like using *atcommand in scripts
Last edited by a moderator: