- KriissMiembro
- Mensajes : 54
pedido de estsos scripts
Mar Jun 05, 2012 12:53 pm
saludos
bengo a pedir dos scripts:
el primero:
quiero change map pero si estan en trainers
no funcione D:! pero si tinen pk si (o propongan una solucion porque si tiene skull se quedaria traped)
el segundo:
es quiero el milatary ranks editado a que tambien de addons D:
eso seria todo muchas gracias
bengo a pedir dos scripts:
el primero:
quiero change map pero si estan en trainers
no funcione D:! pero si tinen pk si (o propongan una solucion porque si tiene skull se quedaria traped)
el segundo:
es quiero el milatary ranks editado a que tambien de addons D:
eso seria todo muchas gracias
Re: pedido de estsos scripts
Mar Jun 05, 2012 12:58 pm
Consegui el que dijiste, de frags por addons :S, xd:
MOD ChangeMap:
- Código:
local t = {
baseSt = 3633, --storages from 3633 to +21 up will be used
frags = 9999 --storage to store the amount of kills of the player
}
local s = { --frags, storage, outfitID, name
{1200,t.baseSt+21,22,'Warmaster'},
{1000,t.baseSt+20,21,'Yalaharian'},
{900,t.baseSt+19,20,'Demonhunter'},
{800,t.baseSt+18,19,'Brotherhood'},
{700,t.baseSt+17,18,'Jester'},
{600,t.baseSt+16,17,'Nightmare'},
{525,t.baseSt+15,16,'Norsemen'},
{450,t.baseSt+14,15,'Shaman'},
{375,t.baseSt+13,14,'Beggar'},
{325,t.baseSt+12,13,'Assassin'},
{275,t.baseSt+11,12,'Pirate'},
{225,t.baseSt+10,11,'Oriental'},
{175,t.baseSt+9,10,'Wizard'},
{150,t.baseSt+8,9,'Druid'},
{125,t.baseSt+7,8,'Barbarian'},
{100,t.baseSt+6,7,'Warrior'},
{75,t.baseSt+5,6,'Summoner'},
{50,t.baseSt+4,5,'Noble'},
{35,t.baseSt+3,4,'Knight'},
{20,t.baseSt+2,3,'Mage'},
{10,t.baseSt+1,2,'Hunter'},
{5,t.baseSt,1,'Citizen'}
}
function getFrags(cid,storage)
for _, t in ipairs(s) do
if getCreatureStorage(cid,storage) >= t[1] then
return t
end
end
end
function onKill(cid, target, lastHit)
if not isPlayer(cid) or not isPlayer(target) then
return true
end
doCreatureSetStorage(cid,t.frags,getCreatureStorage(cid,t.frags)+1)
if getCreatureStorage(cid, t.frags) < 5 or getCreatureStorage(cid, t.frags) > 1200 then
return true
end
if getFrags(cid,t.frags)[2] == nil then
return true
end
if getCreatureStorage(cid,getFrags(cid,t.frags)[2]) == 1 then
return true
end
doPlayerAddOutfitId(cid,getFrags(cid,t.frags)[3],3)
doPlayerSendTextMessage(cid,21,'For obtaining '.. getCreatureStorage(cid,t.frags) ..' kills in total you are rewarded with full '.. getFrags(cid,t.frags)[4] ..' outfit addons!')
doSendMagicEffect(getCreaturePosition(cid), math.random(67))
doCreatureSetStorage(cid,getFrags(cid,t.frags)[2],1)
return true
end
MOD ChangeMap:
- Código:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Map Change" version="2.0" author="Syntax" contact="support@lualand.net" enabled="yes">
<description>
This should teleport all players to a new random town in intervals.
</description>
<config name="mapchange_config"><![CDATA[
config = {
access = 3, -- minimum access to bypass teleportation.
temples = {1,2,3} --townids to teleport to.
}
]]></config>
<event type="login" name="Map Login" event="script"><![CDATA[
function onLogin(cid)
doPlayerSetTown(cid, getGlobalStorageValue(3454))
doTeleportThing(cid, getPlayerMasterPos(cid))
return true
end
]]></event>
<globalevent name="Map Change" interval="60" event="script"><![CDATA[
domodlib('mapchange_config')
function onThink(interval, lastExecution, thinkInterval)
repeat
RDM = math.random(1,#config.temples)
until RDM ~= getGlobalStorageValue(3454) and isInArray(config.temples, RDM)
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerAccess(pid) < config.access and
doPlayerSetTown(pid, config.temples[RDM])
doTeleportThing(pid, getTownTemplePosition(config.temples[RDM]), false)
doSendMagicEffect(getCreaturePosition(pid), 37)
doRemoveCondition(pid, CONDITION_INFIGHT)
doCreatureAddHealth(pid, getCreatureMaxHealth(pid))
doCreatureAddMana(pid, (getCreatureMaxMana(pid) - getCreatureMana(pid)))
doBroadcastMessage("Map has been changed! next map change will be in 2 minutes! have a nice fight!", MESSAGE_STATUS_WARNING)
setGlobalStorageValue(3454, config.temples[RDM])
end
end
return true
end
]]></globalevent>
</mod>
Permisos de este foro:
No puedes responder a temas en este foro.