Ir para conteúdo

tyuahoi

Cavaleiro
  • Total de itens

    177
  • Registro em

  • Última visita

  • Dias Ganhos

    1

Tudo que tyuahoi postou

  1. @Edit Cara Ai de Cima Ja tinha Respondido :x
  2. tyuahoi

    Vender Itens

    Fça isso: 1. Abra o arquivo globalevents.xml e adiciona a tag: <globalevent name="shop" interval="30" script="shop.lua"/> 1.1Faça Um NOvo Arquivo .lua em : data\globalevents\scripts Com O Nome shop.lua E cole isso: -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end 2) Abra seu arquivo constant.lua que se encontra em "data/lib/constant.lua" e adicione esta linha em qualquer lugar: InitShopComunication = 0 3) Na database do seu otserv execute (no phpmyadmin): CREATE TABLE IF NOT EXISTS `z_ots_comunication` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL default '1', PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `z_shop_offer` ( `id` int(11) NOT NULL auto_increment, `points` int(11) NOT NULL default '0', `itemid1` int(11) NOT NULL default '0', `count1` int(11) NOT NULL default '0', `itemid2` int(11) NOT NULL default '0', `count2` int(11) NOT NULL default '0', `offer_type` varchar(255) default NULL, `offer_description` text NOT NULL, `offer_name` varchar(255) NOT NULL, PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `z_shop_history_item` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `offer_id` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ); CREATE TABLE IF NOT EXISTS `z_shop_history_pacc` ( `id` int(11) NOT NULL auto_increment, `to_name` varchar(255) NOT NULL default '0', `to_account` int(11) NOT NULL default '0', `from_nick` varchar(255) NOT NULL, `from_account` int(11) NOT NULL default '0', `price` int(11) NOT NULL default '0', `pacc_days` int(11) NOT NULL default '0', `trans_state` varchar(255) NOT NULL, `trans_start` int(11) NOT NULL default '0', `trans_real` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ); Pronto. @Edit: Se O seu Site Estiver online Me Passe por PM Para que Eu possa lhe Ajudar Com A Questao das Imagens.
  3. Cara Foda-s' to nem ai n ganho nada falando que pego com autorizaçao ou nao nem sei pq q eu fui me mete nessa poh'!
  4. Use Esse Script Para QUem Kiser Que Fike COm Empty POtion Após o Uso. local config = { removeOnUse = "no", splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8, 12, 11}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8, 12}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8, 12}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7, 9, 10, 11}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6, 9, 10}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7, 11}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return true end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid) return true end local aidd = { min = 10901, max = 10911 } if item.actionid < aidd.min then doItemSetAttribute(item.uid, "aid", aidd.min) elseif item.actionid >= aidd.min and item.actionid <= aidd.max then doItemSetAttribute(item.uid, "aid", getItemAttribute(item.uid, "aid")+1) elseif item.actionid >= aidd.max then doTransformItem(item.uid, potion.empty) return TRUE end return true end Esse Script Está Com 10 Cargas Cada Potion Voçe Pode Mudar alterando essa linha: max = 10911 Pronto. Esse Script Que Acabei De CItar Nao é Meu! Creditos: Kiman
  5. Script tirado sem autorizaçao de outro forum. -.- pessa ao dono antes de postar ;D @edit na verdade os 2 script que voce postou aqui foram sem autorizaçao.
  6. com essas configuraçoe svoce nao consegue deixar on? tente liberar uma porta com o ip do modem.
  7. se for pela qualidade brasileiro. aqui no brasil tmb tem uplink d 100mb (: e o ping ficaria mais baixo para os brasileiro que 'jogam' ou iram jogarseu servidor.
  8. Ele Consegue Entrar Porque è o Mesmo Ip De Rede... Voçê Liberou as portas 7171 e 7172?
  9. Quem Disse Que Eles Colocaram Pra essa Copa? è pra De 2014 -.- POKPOSDKOPKASPD
  10. tyuahoi

    Duvida Nas Spells

    Use Este Tutorial Acho Que Ira Resolver seu problema. Tutorial.
  11. Valeu galera Estou Trabalhando Para Deixa-lo 100%!
  12. nossa Cara intao nao sei o que pode ter d errado :s tentou colocar nos 3 servidor com owrd id 1? ex: $config['site']['worlds'] = array(1 => 'SERVIDOR', 1 => 'SERVIDOR', 1 => 'SERVIDOR');
  13. Eu Coloquei O ID 1 aqui e funcionou cra Mais Como Nao Funcionou ae tente colar isso em sua Highscores: <?PHP $list = $_REQUEST['list']; $page = $_REQUEST['page']; switch($list) { case "fist": $id = 0; $list_name = 'Fist Fighting'; break; case "club": $id = 1; $list_name = 'Club Fighting'; break; case "sword": $id = 2; $list_name = 'Sword Fighting'; break; case "axe": $id = 3; $list_name = 'Axe Fighting'; break; case "distance": $id = 4; $list_name = 'Distance Fighting'; break; case "shield": $id = 5; $list_name = 'Shielding'; break; case "fishing": $id = 6; $list_name = 'Fishing'; break; } if(!isset($id)) if($list == "magic") $list_name = "Magic Level"; else { $list_name = 'Experience'; $list = 'experience'; } if(count($config['site']['worlds']) > 0) { $worlds .= '<i>Select world:</i> '; foreach($config['site']['worlds'] as $idd => $world_n) { if($idd == (int) $_GET['world']) { $world_id = $idd; $world_name = $world_n; } } } if($idd == (int) $_GET['world']) { $world_id = $idd; $world_name = $world_n; } if(!isset($world_id)) { $world_id = 1; $world_name = $config['server']['serverName']; } $offset = $page * 100; if(isset($id)) $skills = $SQL->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = '.$id.' ORDER BY value DESC, count DESC LIMIT 101 OFFSET '.$offset); elseif($list == "magic") $skills = $SQL->query('SELECT name,online,maglevel,level,vocation,promotion FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY maglevel DESC, manaspent DESC LIMIT 101 OFFSET '.$offset); elseif($list == "experience") $skills = $SQL->query('SELECT name,online,level,experience,vocation,promotion FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY level DESC, experience DESC LIMIT 101 OFFSET '.$offset); //wyswietlanie wszystkiego $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><CENTER><H2>Ranking for '.$list_name.' on '.$world_name.'</H2></CENTER><BR>'; $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD></TD><TD> <FORM ACTION="?subtopic=highscores" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=highscores><INPUT TYPE=hidden NAME=list VALUE=experience> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['lightborder'].'"> <TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>'; foreach($config['site']['worlds'] as $id => $world_n) { $main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>'; } $main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18> </TD></TR></TABLE></TABLE></FORM></TABLE><br><br><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%></TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=10% CLASS=whites><B>Country</B></TD><TD WIDTH=10% CLASS=whites><B>Rank</B></TD><TD WIDTH=75% CLASS=whites><B>Name</B></TD><TD WIDTH=15% CLASS=whites><b><center>Level</center></B></TD>'; if($list == "experience") $main_content .= '<TD CLASS=whites><b><center>Points</center></B></TD>'; $main_content .= '</TR><TR>'; foreach($skills as $skill) { $player = $ots->createObject('Player'); $player->find($skill['name']); $account = $player->getAccount(); $account_db = new OTS_Account(); $flagg = $account->getCustomField("flag"); if($number_of_rows < 100) { if($list == "magic") $skill['value'] = $skill['maglevel']; if($list == "experience") $skill['value'] = $skill['level']; if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'"><td><image src="images/flags/'.$flagg.'.png"/></td><td>'.($offset + $number_of_rows).'.</td><td><a href="?subtopic=characters&name='.urlencode($skill['name']).'">'.($skill['online']>0 ? "<font color=\"green\">".$skill['name']."</font>" : "<font color=\"red\">".$skill['name']."</font>").'</a><br><small>'.$skill['level'].' '.$vocation_name[$world_id][$skill['promotion']][$skill['vocation']].'</small></td><td><center>'.$skill['value'].'</center></td>'; if($list == "experience") $main_content .= '<td><center>'.$skill['experience'].'</center></td>'; $main_content .= '</tr>'; } else $show_link_to_next_page = TRUE; } $main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>'; if($page > 0) $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>'; if($show_link_to_next_page) $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>'; $main_content .= '</TABLE></TD><TD WIDTH=5%><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD><TD WIDTH=15% VALIGN=top ALIGN=right><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=whites><B>Choose<br/>a skill</B></TD></TR><TR BGCOLOR="'.$config['site']['lightborder'].'"><TD><A HREF="?subtopic=highscores&list=experience&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/level.png" style="border: none;"></A><BR><A HREF="?subtopic=highscores&list=magic&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/ml.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=shield&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/def.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=distance&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/dist.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=club&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/club.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=sword&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/sword.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=axe&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/axe.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=fist&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/fist.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=fishing&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/fish.png" style="border: none;"/></A><BR></TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>'; ?>
  14. Vá Ate: C:\xampp\htdocs abra o: highscores e procure por isso: $world_id = 0; e Mude Para O ID do seu servidor ;D
  15. tente adicionar o 0 e o 2 para ver se augum contem seus player.
  16. nao tem como escolher outro servidor (Outro word) ali nos highscores?
  17. Mesmo Criando Outro char so aparece o lvl 0?
  18. va em: C:\xampp\htdocs abra o: whoisonline e apague essas linhas: //Wykresik $main_content.= ' <TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=10% CLASS=white><center><B>Players Online Chart</B></TD></TR></TABLE> <table align="center"><td> <a href="http://otslist.eu/"><img border="0" src="http://otslist.eu/stats/3070'.$config['site']['otslist.eu'].'" width="100%" /></a> </td> </tr> </table>'; if($number_of_players_online == 0) //server status - server empty $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1><TR><TD>Currently no one is playing on <b>'.$config['site']['worlds'][$world_id].'</b>.</TD></TR></TABLE></TD></TR></TABLE><BR>'; else
  19. você adicionou o server? ai uando voce clica pra ir na descriçao etc. no link vai ter uuns numeros antes do ome tipo assim /0000/nome do server os numeros é o ID flw.
  20. Olá Percebi Que Muita Gente Esta Procurando Tutoriais De Como COlocar Suas Potion Com Carga. Entao, Vamos ao Trabalho. 1º Passo. Vá Até data\actions\scripts\liquids Abra O: potions.lua Apague Tudo Que Aver Dentro E Cole Isso: local config = { realAnimation = true, -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } local POTIONS = { [8704] = {charges = 100, splash = 2, health = {50, 100}}, -- small health potion [7618] = {charges = 100, splash = 2, health = {100, 200}}, -- health potion [7588] = {charges = 100, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8, 12, 11}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {charges = 100, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8, 12}, vocStr = "knights"}, -- great health potion [8473] = {charges = 100, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8, 12}, vocStr = "knights"}, -- ultimate health potion [7620] = {charges = 100, splash = 7, mana = {70, 130}}, -- mana potion [7589] = {charges = 100, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7, 9, 10, 11}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {charges = 100, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6, 9, 10}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {charges = 100, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7, 11}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion or not isPlayer(itemEx.uid)) then return false end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges)) then return doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) doItemSetAttribute(item.uid, 'aid', math.max(101, item.actionid + 1)) doItemSetAttribute(item.uid, 'description', 'Charges: ' .. 100 + potion.charges - getItemAttribute(item.uid, 'aid')) if item.actionid >= 100 + potion.charges then doRemoveItem(item.uid) end return true end Salve E Feche. 2º passo. Va Até: data\items Abra O items.xml procure por: - Great Mana Potion. - Great Health Potion. - Great Spirit Potion. - Ultimate Health Potion. - Strong Mana Potion. - Strong Health Potion. - Mana Potion. - Heath potion. Acresente essas Linhas Nas Potions. Após: <attribute key="weight" value="220" /> De Cada Potion. Acresente Isso: <attribute key="charges" value="100"/> <attribute key="showCharges" value="1"/> Caso Voçe Queira Mudar O peso Dela Basta Editar Está Linha: <attribute key="weight" value="220" 220 = 2.20 Ainda Nao Esta 100% Mais ja Ajuda. Como vai Funcionar? So Ira Aparecer as Charges Quando Voce Der Look Na Potion. Estou Trabalhando para Aparecer na Potion, Assim Que Terminar Atualizo Aqui. Exemplos. Look Potion Antes De Usar: You see a great mana potion that has 100 charges left. It weighs 2.20 oz. This potion can only be consumed by sorcerers and druids of level 80 or higher. Após Usar 1 Vez: You see a great mana potion that has 100 charges left. It weighs 2.20 oz. Charges: 99. Espero Que tenham Gostado. Abraço!
  21. Mais Ele nao recebe os dias? adiciou script no global events?
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...