• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Movement if player's guild is the woe's guild owner

chiitus

Member
Joined
Jun 1, 2009
Messages
206
Reaction score
12
Hello guys, i need help with this script, i make this one but doesn't work.

Script:
Code:
dofile("./_woe.lua")

function onStepIn(cid, item, position, fromPosition)
--local guilddocara = getPlayerGuildName(cid)
  if getPlayerGuildName(cid) ~= Woe.guildName() then
      doTeleportThing(cid, fromPosition, true)
      doPlayerSendTextMessage(cid, 22, "Only winners of War of Emperium.")
    return TRUE
  end
return TRUE
end
 
why did you put -- in front of local? and i still have no idea what you want this script to do, but was the textmessage thing supposed to be a cancel? if so use this
Code:
else
    doPlayerSendCancel(cid, "Only for winners of War of Emperium.")
 
Example: If the player's guild is equal the guild has dominated war of emperium, the player can pass, otherway not.

I put the "--" just for comment, that variable is not be in use.
But with this code that you post the "else" will show the message to players if they passed, so, the right is:
doPlayerSendCancel(cid, "Good Hunt.")

Understand?
The error on this script is:
- The script don't check the players guild, but the function is right "getPlayerGuildName(cid)"

I want a script that verify the player guild name.
 
Do you get errors, which server do you use and are you sure the guildname in correct?
I tested this on TFS 0.3.6 and it worked fine for me.
Code:
function onStepIn(cid, item, position, fromPosition)
    if getPlayerGuildName(cid) ~= "Guildname" then
       doTeleportThing(cid, fromPosition, true)
       doPlayerSendTextMessage(cid, 22, "Only winners of War of Emperium.")
    end
    return TRUE
end
 
Exactly, but the "Woe.guildName()" is a variable..
I know why didn't work before now, is because the woe still not executed.
So the variable is unnused.
Thanks for the help!
 
Back
Top