• 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!

All check this one

freak15

Professional Hoster
Joined
Dec 31, 2008
Messages
356
Reaction score
2
Location
Sweden
Hello Otlander's i was sitting and thinking about a cool script for tibia ots pvp/rpg
the script should work like this
When people's create account on your server website and than log-in to thair account and when thay make character thay can choise to be in :example: Dark'shadow or light'shadow
and thats like a guild or more like wow alliance/horde
and the light'shadow guild you cant leave it or anything like that
and you cant attack peoples in light'shadow if your one of tham
light'shadow can only atack players in dark'shadow and dark shadow can only attack players in light'shadow..
and than you can make :example: Light'shadow/dark'shadow rank system and than you can make like a vip thing you can buy for real money and you can change your character from light'shadow to dark'shadow and dark'shadow to light'shadow i thing you got it..
what you think of this script peoples?

i guess peoples think this will be awesome if it's works to create ;)

Thankz for taking your time and read it

///freak15
 
[...]and you cant attack peoples in light'shadow if your one of tham
light'shadow can only atack players in dark'shadow and dark shadow can only attack players in light'shadow...[...]

You can make this using in Creature events:
Code:
onCombat(cid, target)
onAttack(cid, target)
and storage id to store guild and rank in this guild

You can show rank using in Creature events:
Code:
onLook(cid, thing, position, lookDistance)
and table.

#EDIT#
I don't know how make this:
When people's create account on your server website and than log-in to thair account and when thay make character thay can choise to be in :example: Dark'shadow or light'shadow [...]
 
I actually made a script like this

But instead of restricting pvp to factions. I made it to give you exp only when you kill opposing faction. and i had a quest lineup that they would choose either good or evil. If thats something your looking for i could remake it for you. Only if you promise to Rep++
 
Credits onLook part to creator from thread http://otland.net/f81/v4-patch-4-th...ranks-bars-highscores-features-php-sql-54500/
rest credits to me.

Not tested, but this propably will work on TFS 0.3.5pl1:
In creaturescripts.xml add above </creaturescripts>:
PHP:
<event type="combat" name="TeamProtection" event="script" value="teamprot.lua"/>
<event type="attack" name="TeamAttack" event="script" value="teamprot.lua"/>
<event type="login" name="TeamSystem" event="script" value="teamprot.lua"/>
<event type="look" name="descrLook" event="script" value="teamprot.lua"/>


Then create file 'teamprot.lua' in 'data\creaturescripts\scripts' and paste this
Lua:
--[[
<event type="combat" name="TeamProtection" event="script" value="teamprot.lua"/>
<event type="attack" name="TeamAttack" event="script" value="teamprot.lua"/>
<event type="login" name="TeamSystem" event="script" value="teamprot.lua"/>
--- --- // maked by Hellboy aka Kronos aka Yrpen (etc.) \\ --- ---
]]

function onLogin(cid)
	registerCreatureEvent(cid, "TeamAttack")
	registerCreatureEvent(cid, "TeamProtection")
	registerCreatureEvent(cid, "descrLook")
	return true
end

function onCombat(cid, target)
	local STORAGE_NUMBER = 6677
	if not isPlayer(cid) or not isPlayer(target) then
		return true
	end
	
    if getPlayerStorageValue(cid, STORAGE_NUMBER) == getPlayerStorageValue(target, STORAGE_NUMBER) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER)
        return false
    end
    return true
end

function onAttack(cid, target)
	return onCombat(cid, target)
end

rankTable = {
	[1] = {
		[-1] = "Dark Dregars",
		[0] = "Dark Sheders",
		[1] = "Dark Vertis"},
	[2] = {
		[-1] = "Light Swamps",
		[0] = "Light Shaddars",
		[1] = "Light Wartik"}
}
function onLook(cid, thing, position, lookDistance)
	reputation_storageid = --- WRITE HERE NUMBER OF STORAGE ID
	team_storageid = --- WRITE HERE NUMBER OF STORAGE ID
	if(isPlayer(thing.uid)) then
		if getPlayerSex(cid) == 1 then --- male
			c = "He"
		else
			c = "She"
		end
	
		if(thing.uid == cid) then
			doPlayerSendTextMessage(cid, 20, "You are "..(rankTable[getPlayerStorageValue(thing.uid, team_storageid)])[getPlayerStorageValue(thing.uid, reputation_storageid)].."")
		else
			doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." is member of Team nr "..getPlayerStorageValue(thing.uid, team_storageid)..".\n "..c.." is "..(rankTable[getPlayerStorageValue(thing.uid, team_storageid)])[getPlayerStorageValue(thing.uid, reputation_storageid)]..".")
		end
	end          
	return true
end
 
Last edited:
Back
Top