26
Re: [Sistema] Task Sytem full Jue Abr 26, 2018 4:59 pm
Deget92

Miembro

![[Sistema] Task Sytem full - Página 2 Bezcot12](https://i.servimg.com/u/f62/19/90/16/70/th/bezcot12.jpg)
Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...
Ir a la página : 1, 2, 3
Deget92 escribió:hola, Yo mato demonios y todavía 0/300 :/ tfs 0.4 tibia 8,6
Deget92 escribió:No tengo errores en la consola
Deget92 escribió:0 bledow en la consola, tengo todo lo que en la guía, pero cómo matar a la criatura de cualquiera de la lista no funciona ...
TheFlariuz escribió:se puede adaptar para tfs 1.2
Deget92 escribió:lo agregaras? player_storage
-------------- TASK SYSTEM --------------
registerCreatureEvent(cid,"tasksystem")
if getPlayerStorageValue(cid, 19000) < 0 then
setPlayerStorageValue(cid, 19000, 0)
end
if getPlayerStorageValue(cid, 19001) < 0 then
setPlayerStorageValue(cid, 19001, 0)
end
<?php
$result = $SQL->query("SELECT `players`.`name`, `player_storage`.`value` FROM `players` JOIN `player_storage` ON `players`.`id` = `player_storage`.`player_id` WHERE `player_storage`.`key` = 19900 ORDER BY CAST(`player_storage`.`value` AS UNSIGNED) DESC LIMIT 30 ;");
$main_content .= '<div style="text-align: center; font-weight: bold;"><h2>Top of Task Makers on ' . $config['server']['serverName'] . '</h2></div>
<center><table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="'.$config['site']['vdarkborder'].'">
<td width="10%"><b><font color=white><center>Position</font></center></b></td>
<td width="60%"><b><font color=white><center>Player Name</center></b></font></td>
<td width="30%"><b><font color=white><center>Task Points</center></b></font></td>
</tr>';
$i = 0;
foreach ($result as $entry)
{
$i++;
$main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '"> ';
$main_content .= '
<td><center>'.$i.' </center></td>
<td><b><center><a href="?subtopic=characters&name='.$entry['name'].'">'.$entry['name'].'</a></center></b></td>
<td><center>'. $entry["value"] .'</center></td>';
$main_content .= "</td></tr>";
}
$main_content .= '</table><br />';
?>
Deget92 escribió:en login.lua tengopara mostrar la cantidad de tasks que necesito en el sitio getPlayerStorageValue
- Código:
-------------- TASK SYSTEM --------------
registerCreatureEvent(cid,"tasksystem")
if getPlayerStorageValue(cid, 19000) < 0 then
setPlayerStorageValue(cid, 19000, 0)
end
if getPlayerStorageValue(cid, 19001) < 0 then
setPlayerStorageValue(cid, 19001, 0)
end
taskranking.lua
- Código:
<?php
$result = $SQL->query("SELECT `players`.`name`, `player_storage`.`value` FROM `players` JOIN `player_storage` ON `players`.`id` = `player_storage`.`player_id` WHERE `player_storage`.`key` = 19900 ORDER BY CAST(`player_storage`.`value` AS UNSIGNED) DESC LIMIT 30 ;");
$main_content .= '<div style="text-align: center; font-weight: bold;"><h2>Top of Task Makers on ' . $config['server']['serverName'] . '</h2></div>
<center><table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="'.$config['site']['vdarkborder'].'">
<td width="10%"><b><font color=white><center>Position</font></center></b></td>
<td width="60%"><b><font color=white><center>Player Name</center></b></font></td>
<td width="30%"><b><font color=white><center>Task Points</center></b></font></td>
</tr>';
$i = 0;
foreach ($result as $entry)
{
$i++;
$main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '"> ';
$main_content .= '
<td><center>'.$i.' </center></td>
<td><b><center><a href="?subtopic=characters&name='.$entry['name'].'">'.$entry['name'].'</a></center></b></td>
<td><center>'. $entry["value"] .'</center></td>';
$main_content .= "</td></tr>";
}
$main_content .= '</table><br />';
?>
-- Script por amoeba13 --
function onSay(cid, words, param, channel)
local stt = ""
for pika, tasks in pairs(amoebaTask) do
for i = 1, (#amoebaTask) do
nomes = amoebaTask[i].nomes
storages = amoebaTask[i].storagecount
counts = amoebaTask[i].count
stt = stt.. nomes .. " [" .. taskKills(cid, storages) .. "/" .. counts .. "]\n"
end
doPlayerPopupFYI(cid, "Task Disponibles en Winner: \n" .. stt .. "")
break
end
return true
end
{nomes = "Dragon", nome= {("Dragon")}, creatures = {"Dragon"}, storage = 2312109, storagecount = 890109, count = 60, exp = 500000, money = 0, premios = {{6527, 2},{2160, 15}}},
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Dragon" nameDescription="a dragon" race="blood" experience="700" speed="180" manacost="0">
<health now="1000" max="1000"/>
<look type="34" corpse="5973"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="300"/>
</flags>
<attacks>
<attack name="melee" interval="2000" min="-10" max="-120"/>
<attack name="fire" interval="2000" chance="15" range="7" radius="4" target="1" min="-60" max="-110">
<attribute key="shootEffect" value="fire"/>
<attribute key="areaEffect" value="firearea"/>
</attack>
<attack name="fire" interval="3000" chance="8" length="8" spread="3" min="-90" max="-170">
<attribute key="areaEffect" value="firearea"/>
</attack>
</attacks>
<defenses armor="25" defense="18">
<defense name="healing" interval="1000" chance="13" min="34" max="56">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element firePercent="100"/>
<element earthPercent="80"/>
<element energyPercent="20"/>
<element icePercent="-10"/>
</elements>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="GROOAAARRR" yell="1"/>
<voice sentence="FCHHHHH" yell="1"/>
</voices>
<loot>
<item id="2672" countmax="3" chance="90000"/><!-- dragon ham -->
<item id="2148" countmax="100" chance="100000"/><!-- gold coin -->
<item id="2398" chance="20000"/><!-- mace -->
<item id="2455" chance="6666"/><!-- crossbow -->
<item id="2434" chance="1333"/><!-- dragon hammer -->
<item id="2509" chance="1818"/><!-- steel shield -->
<item id="2406" chance="20000"/><!-- short sword -->
<item id="2647" chance="2222"/><!-- plate legs -->
<item id="2457" chance="3333"/><!-- steel helmet -->
<item id="2387" chance="4000"/><!-- double axe -->
<item id="7430" chance="400"/><!-- dragonbone staff -->
<item id="2397" chance="5000"/><!-- longsword -->
<item id="2546" countmax="13" chance="39000"/><!-- burst arrow -->
<item id="5877" countmax="1" chance="4000"/><!-- green dragon leather -->
<item id="1987" chance="59000"><!-- bag -->
<inside>
<item id="2187" chance="1111"/><!-- wand of inferno -->
<item id="2148" countmax="25" chance="100000"/><!-- gold coin -->
<item id="2516" chance="600"/><!-- dragon shield -->
<item id="2145" countmax="3" chance="1538"/><!-- small diamond -->
<item id="2177" chance="2000"/><!-- life crystal -->
<item id="2413" chance="6666"/><!-- broadsword -->
<item id="2409" chance="509"/><!-- serpent sword -->
<item id="5920" countmax="1" chance="5000"/><!-- green dragon scale -->
</inside>
</item>
</loot>
</monster>
Deget92 escribió:hola, gran script funcionó bien, pero agregué "monster level" yo ahora No cuenta los monstruos muertos...
- Código:
{nomes = "Dragon", nome= {("Dragon")}, creatures = {"Dragon"}, storage = 2312109, storagecount = 890109, count = 60, exp = 500000, money = 0, premios = {{6527, 2},{2160, 15}}},
- Código:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Dragon" nameDescription="a dragon" race="blood" experience="700" speed="180" manacost="0">
<health now="1000" max="1000"/>
<look type="34" corpse="5973"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="300"/>
</flags>
<attacks>
<attack name="melee" interval="2000" min="-10" max="-120"/>
<attack name="fire" interval="2000" chance="15" range="7" radius="4" target="1" min="-60" max="-110">
<attribute key="shootEffect" value="fire"/>
<attribute key="areaEffect" value="firearea"/>
</attack>
<attack name="fire" interval="3000" chance="8" length="8" spread="3" min="-90" max="-170">
<attribute key="areaEffect" value="firearea"/>
</attack>
</attacks>
<defenses armor="25" defense="18">
<defense name="healing" interval="1000" chance="13" min="34" max="56">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element firePercent="100"/>
<element earthPercent="80"/>
<element energyPercent="20"/>
<element icePercent="-10"/>
</elements>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="GROOAAARRR" yell="1"/>
<voice sentence="FCHHHHH" yell="1"/>
</voices>
<loot>
<item id="2672" countmax="3" chance="90000"/><!-- dragon ham -->
<item id="2148" countmax="100" chance="100000"/><!-- gold coin -->
<item id="2398" chance="20000"/><!-- mace -->
<item id="2455" chance="6666"/><!-- crossbow -->
<item id="2434" chance="1333"/><!-- dragon hammer -->
<item id="2509" chance="1818"/><!-- steel shield -->
<item id="2406" chance="20000"/><!-- short sword -->
<item id="2647" chance="2222"/><!-- plate legs -->
<item id="2457" chance="3333"/><!-- steel helmet -->
<item id="2387" chance="4000"/><!-- double axe -->
<item id="7430" chance="400"/><!-- dragonbone staff -->
<item id="2397" chance="5000"/><!-- longsword -->
<item id="2546" countmax="13" chance="39000"/><!-- burst arrow -->
<item id="5877" countmax="1" chance="4000"/><!-- green dragon leather -->
<item id="1987" chance="59000"><!-- bag -->
<inside>
<item id="2187" chance="1111"/><!-- wand of inferno -->
<item id="2148" countmax="25" chance="100000"/><!-- gold coin -->
<item id="2516" chance="600"/><!-- dragon shield -->
<item id="2145" countmax="3" chance="1538"/><!-- small diamond -->
<item id="2177" chance="2000"/><!-- life crystal -->
<item id="2413" chance="6666"/><!-- broadsword -->
<item id="2409" chance="509"/><!-- serpent sword -->
<item id="5920" countmax="1" chance="5000"/><!-- green dragon scale -->
</inside>
</item>
</loot>
</monster>
Deget92 escribió:por lo que no funcionará para mí?
{nomes = "Dragon", nome= {("Dragon [1] "),("Dragon [2] "),("Dragon [3] "),("Dragon [4] "),("Dragon [5] "),("Dragon [6] "),("Dragon [7] "),("Dragon [8] "),("Dragon [9] "),("Dragon [10] ")}, creatures = {"Dragon [1]", "Dragon [2]", "Dragon [3]", "Dragon [4]", "Dragon [5]", "Dragon [6]", "Dragon [7]", "Dragon [8]", "Dragon [9]", "Dragon [10]"}, storage = 2312109, storagecount = 890109, count = 60, exp = 500000, money = 0, premios = {{6527, 2},{2160, 15}}},
paulina24 escribió:Funcionando a la perfeccion en otx 2.9 !!!! como se puede hacer para que en default te vaya diciendo cuantos llevas matados? ejemplo: vas matando a dragones y te dice 1/100 matas a otro 2/100 que te vaya diciendo cada vez que mates
paulina24 escribió:Maya, usted podria facilitarme el Counter kill para este script porfavor?
local monsters = {
--name = storage
["rat"] = 35001,
["troll"] = 35002,
["rotworm"] = 35003,
["dragon"] = 35004,
["dragon lord"] = 35005,
["demon"] = 35006,
}
function onKill(cid, target)
if(isPlayer(target) ~= TRUE) then
local master = getCreatureMaster(target)
if(master and master ~= target) then return FALSE end
local name = getCreatureName(target)
local monster = monsters[string.lower(name)]
if(monster) then
local killedMonsters = getPlayerStorageValue(cid, monster)
if(killedMonsters == -1) then
killedMonsters = 1
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You killed " .. killedMonsters .. " " .. name .. "'s.")
setPlayerStorageValue(cid, monster, killedMonsters + 1)
end
end
return TRUE
end
<event type="kill" name="KilledMonstersCounter" event="script" value="monster_counter.lua"/>
registerCreatureEvent(cid, "KilledMonstersCounter")
bhaikerr escribió:Hola gente esposible me puedan ayudar..!!! hce todo como sale en el tutorial pero al intentar hacer !task con un player me sale este error
[5/5/2020 19:3:59] [Error - TalkAction Interface]
[5/5/2020 19:3:59] data/talkactions/scripts/amoebaTask.lua:onSay
[5/5/2020 19:3:59] Description:
[5/5/2020 19:3:59] data/talkactions/scripts/amoebaTask.lua:26: attempt to call global 'doPlayerPopupFYI' (a nil value)
[5/5/2020 19:3:59] stack traceback:
[5/5/2020 19:3:59] data/talkactions/scripts/amoebaTask.lua:26: in function
<data/talkactions/scripts/amoebaTask.lua:4>
[Tienes que estar registrado y conectado para ver este vínculo]
doPlayerPopupFYI(cid, "Task Disponibles en Winner: \n" .. stt .. "")
doPlayerSendTextMessage(cid, 19, "Task Disponibles en Winner: \n" .. stt .. "")
bhaikerr escribió:Gracias amigo si funciono muy bien ahora me preguntaba si existe la posibilidad de que se vea como si fuera un quest log ??? para que no se vea en letras blancas mire
[Tienes que estar registrado y conectado para ver este vínculo]
me pregunto sobre
como se el storage de los mostros ???? y cual es el storagecount ???
ejemplo me gustaria agregarle
Troll
Orc
Cyclops
Larva
Scarab
Ancient scarab. ETc entre esos muchos mostros mas..!!!! ya que mi serve es 7.6
{nomes = "Queen Rotworm", nome= {("Queen Rotworm")}, creatures = {"Queen Rotworw"}, storage = 2312108, storagecount = 890108, count = 50, exp = 10000, money = 0, premios = {{6527, 1},{2160, 2}}},
storagecount = 890108, count = 50
<quest name="Killing Trolls..." startstorageid="100157" startstoragevalue="1">
<mission name="Paw and Fur: Trolls" storageid="65001" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 trolls." />
</quest>
storageid="65001" startvalue="0" endvalue="100"
storageid="890108" startvalue="0" endvalue="50"
<quest name="Killing Demons..." startstorageid="100157" startstoragevalue="1">
<mission name="Paw and Fur: Demons" storageid="65001" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 trolls." />
</quest>
Ir a la página : 1, 2, 3
Temas similares
Permisos de este foro:
No puedes responder a temas en este foro.
|
|