• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Spell Shinra Tensei: Repel them!

Lua:
function onAttack(cid, target)

local mages, warriors = {1, 2}, {3, 4}

    if isMonster(target) or isMonster(cid) then
        return true
    end

    if(isInArray(mages, getPlayerVocation(cid)) and isInArray(warriors, getPlayerVocation(target)) or (isInArray(warriors, getPlayerVocation(cid)) and isInArray(mages, getPlayerVocation(target)))) then
        doPlayerSendCancel(cid, "You can not attack this player.")
            return false
     end
     return true
end

that script that you received wont protect from area attacks ex. runes
 
woooh more rep for cybermaster!


and maybe wondering, would you know how to edit the script so it protects you from area spells? or does that require some type of source edit or something?

if you can edit the script that would be effing amazing =)
 
ofc that's possible with an OnStatsChange creaturescript (0.3.5 and higher i guess)

:/ why colandus?
 
LOL fail on my part sorry haha >.< i repped you :p


hmm do you think whenever you have time you can make the script? i mean ill try and put it on the request bored or help or something but if you have time gogo! :D
 
LOL fail on my part sorry haha >.< i repped you :p


hmm do you think whenever you have time you can make the script? i mean ill try and put it on the request bored or help or something but if you have time gogo! :D
gimme some minutes...
 
yeh, im developing a very unique one, tons of features
 
test this one
add to login.lua:
Lua:
registerCreatureEvent(cid, "noobprotection")

add to creaturescripts.xml:
Lua:
<event type="statschange" name="noobprotection" event="script" value="noobprotection.lua"/>

create noobprotection.lua @ data/creaturescripts/scripts
Lua:
function onStatsChange(cid, attacker, type, combat, value)
local mages, warriors = {1, 2}, {3, 4}

    if isMonster(attacker) or isMonster(cid) then
        return true
    end

     if type == STATSCHANGE_HEALTHLOSS and (isInArray(mages, getPlayerVocation(cid)) and isInArray(warriors, getPlayerVocation(attacker)) or (isInArray(warriors, getPlayerVocation(cid)) and isInArray(mages, getPlayerVocation(attacker)))) then
        return false
     end
    
        return true
end
 
Ahh cool ill be on the lookout for that lol, well hey i gotta shutdown its 1am over here but if you can do the script with ease and try to figure out why it doesnt work id appreciate it =) its still not working so hopefully your script works.. ill be looking at the website from my phone to see the script thanks alot bro!
great scripter!
 
Ahh cool ill be on the lookout for that lol, well hey i gotta shutdown its 1am over here but if you can do the script with ease and try to figure out why it doesnt work id appreciate it =) its still not working so hopefully your script works.. ill be looking at the website from my phone to see the script thanks alot bro!
great scripter!
i just posted it one second before this last post of urs

<< look back

test this one
add to login.lua:
Lua:
registerCreatureEvent(cid, "noobprotection")

add to creaturescripts.xml:
Lua:
<event type="statschange" name="noobprotection" event="script" value="noobprotection.lua"/>

create noobprotection.lua @ data/creaturescripts/scripts
Lua:
function onStatsChange(cid, attacker, type, combat, value)
local mages, warriors = {1, 2}, {3, 4}

    if isMonster(attacker) or isMonster(cid) then
        return true
    end

     if type == STATSCHANGE_HEALTHLOSS and (isInArray(mages, getPlayerVocation(cid)) and isInArray(warriors, getPlayerVocation(attacker)) or (isInArray(warriors, getPlayerVocation(cid)) and isInArray(mages, getPlayerVocation(attacker)))) then
        return false
     end
    
        return true
end
 
Last edited:
hey bro i got this error when i tried your code


Code:
[23/12/2009 13:14:46] Lua Script Error: [CreatureScript Interface] 
[23/12/2009 13:14:46] data/creaturescripts/scripts/noobprotection.lua:onStatsChange

[23/12/2009 13:14:46] internalGetPlayerInfo(). Player not found

[23/12/2009 13:14:46] Lua Script Error: [CreatureScript Interface] 
[23/12/2009 13:14:46] data/creaturescripts/scripts/noobprotection.lua:onStatsChange

[23/12/2009 13:14:46] internalGetPlayerInfo(). Player not found

think you can fix? >.<
 
hey bro i got this error when i tried your code


Code:
[23/12/2009 13:14:46] Lua Script Error: [CreatureScript Interface] 
[23/12/2009 13:14:46] data/creaturescripts/scripts/noobprotection.lua:onStatsChange

[23/12/2009 13:14:46] internalGetPlayerInfo(). Player not found

[23/12/2009 13:14:46] Lua Script Error: [CreatureScript Interface] 
[23/12/2009 13:14:46] data/creaturescripts/scripts/noobprotection.lua:onStatsChange

[23/12/2009 13:14:46] internalGetPlayerInfo(). Player not found
think you can fix? >.<
tfs 0.3.5/6?
 
Is it also possible repel spell in a area spell like and could you also make it?

0, 0, 1, 1, 1, 0, 0
0, 1, 1, 1, 1, 1, 0
1, 1, 1, 1, 1, 1, 1
1, 1, 1, 3, 1, 1, 1
1, 1, 1, 1, 1, 1, 1
0, 1, 1, 1, 1, 1, 0
0, 0, 1, 1, 1, 0, 0


then it will be pushed like until they are out of the area spell and do some damage

..... ^
\ \ \ | / / /
\ \ \ | / / /
\ \ \ | / / /
< --- 3 --- >
/ / / | \ \ \
/ / / | \ \ \
/ / / | \ \ \
......V

and i need also a spell but it will be like a explosion rune area and pushed same way as the spell you got now

And if you got pushed and there is a wall or mountain or anything that blocks then you won't be moved but receive extra damage and appear 1 minute long a crack on the place where u got hit ID: 6299
 
work 100% thx :D i use it on the other gods of my server XD like a ping pong, human ball :D
 
best spell of ever, but i had a question how i can repel the target?... i mean actually i just could repel moster forward me.. i want repel to any direction from me sorry for my english
 
best spell of ever, but i had a question how i can repel the target?... i mean actually i just could repel moster forward me.. i want repel to any direction from me sorry for my english
that would require a script modification
 
u can help me with that? xP sorry if i bother you, is hard for me modificate tht, thanks with u time :p good luck
 
I have found a bug. You can kill the players regardless of level protection limit and you will not get a frag.
 
Back
Top