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

Sacred Papers

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
The script don't work, please help-me!!

Script1:
PHP:
function onUse(cid, item, frompos, item2, topos)
	if item.id == 7720 then
		doSummonCreature("tarantula", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a tarantula, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, tarantula, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7702 then
		doSummonCreature("rotworm", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a rotworm, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, rotworm, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7844 then
		doSummonCreature("cyclops", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a cyclops, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, cyclops, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7845 then
		doSummonCreature("troll", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a troll, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, troll, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7846 then
		doSummonCreature("dark monk", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a dark monk, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, dark monk, fromPos)
		doRemoveItem(item.uid, 1)
         end
return 1
end

Script2:
PHP:
	<action itemid="7720" script="sacred_papers.lua" />
	<action itemid="7702" script="sacred_papers.lua" />
	<action itemid="7844" script="sacred_papers.lua" />
	<action itemid="7845" script="sacred_papers.lua" />
	<action itemid="7846" script="sacred_papers.lua" />

Help-me!!!
 
The script don't work, please help-me!!

Script1:
PHP:
function onUse(cid, item, frompos, item2, topos)
	if item.id == 7720 then
		doSummonCreature("tarantula", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a tarantula, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, tarantula, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7702 then
		doSummonCreature("rotworm", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a rotworm, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, rotworm, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7844 then
		doSummonCreature("cyclops", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a cyclops, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, cyclops, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7845 then
		doSummonCreature("troll", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a troll, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, troll, fromPos)
		doRemoveItem(item.uid, 1)

	elseif item.id == 7846 then
		doSummonCreature("dark monk", fromPos)
		doCreatureSay(cid, (getCreatureName(cid)) created a dark monk, TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, dark monk, fromPos)
		doRemoveItem(item.uid, 1)
         end
return 1
end

Script2:
PHP:
	<action itemid="7720" script="sacred_papers.lua" />
	<action itemid="7702" script="sacred_papers.lua" />
	<action itemid="7844" script="sacred_papers.lua" />
	<action itemid="7845" script="sacred_papers.lua" />
	<action itemid="7846" script="sacred_papers.lua" />

Help-me!!!

the problem is that you sucks~
and...
Code:
function onUse(cid, item, frompos, item2, topos)
    if item.itemid == 7720 then
        doSummonCreature("tarantula", fromPos)
        doCreatureSay(cid, (getCreatureName(cid)) created a tarantula, TALKTYPE_ORANGE_1)
        doConvinceCreature(cid, tarantula, fromPos)
        doRemoveItem(item.uid, 1)

    elseif item.itemid == 7702 then
        doSummonCreature("rotworm", fromPos)
        doCreatureSay(cid, (getCreatureName(cid)) created a rotworm, TALKTYPE_ORANGE_1)
        doConvinceCreature(cid, rotworm, fromPos)
        doRemoveItem(item.uid, 1)

    elseif item.itemid == 7844 then
        doSummonCreature("cyclops", fromPos)
        doCreatureSay(cid, (getCreatureName(cid)) created a cyclops, TALKTYPE_ORANGE_1)
        doConvinceCreature(cid, cyclops, fromPos)
        doRemoveItem(item.uid, 1)

    elseif item.itemid == 7845 then
        doSummonCreature("troll", fromPos)
        doCreatureSay(cid, (getCreatureName(cid)) created a troll, TALKTYPE_ORANGE_1)
        doConvinceCreature(cid, troll, fromPos)
        doRemoveItem(item.uid, 1)

    elseif item.itemid == 7846 then
        doSummonCreature("dark monk", fromPos)
        doCreatureSay(cid, (getCreatureName(cid)) created a dark monk, TALKTYPE_ORANGE_1)
        doConvinceCreature(cid, dark monk, fromPos)
        doRemoveItem(item.uid, 1)
         end
return 1
end
 
Won't work Nahruto ^.^

Try this:
PHP:
local monsters = {
	[7720] = "tarantula",
	[7722] = "rotworm",
	[7844] = "cyclops",
	[7845] = "troll",
	[7846] = "dark monk"
}

function onUse(cid, item, fromPos)
	local monster = monsters[item.itemid]
	if monster then
		local summon = doSummonCreature(monster, fromPos)
		doCreatureSay(cid, getCreatureName(cid).." summoned a "..monster..".", TALKTYPE_ORANGE_1)
		doConvinceCreature(cid, summon)
		doRemoveItem(item.uid, 1)
	end
	return TRUE
end
 
Last edited:
Where exactly are you trying to summon it? Is there any room left? :p And does the monster "tarantula" exist in your server? xD
 
I am trying creates in camp...
My server have all monsters and all monsters 100% of Tibia Global, chances in drop, imunities, names, atacks, defs, spells, etc.

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="tarantula" nameDescription="a tarantula" race="VENOM" experience="310" speed="268" manacost="485">
  <health now="225" max="225"/>
  <look type="219" head="20" body="30" legs="40" feet="50" corpse="6060"/>
  <targetchange interval="5000" chance="8"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
    <attack name="melee" interval="2000" skill="40" attack="38" poison="30"/>
    <attack name="poisonfield" interval="1000" chance="20" range="1">
      <attribute key="shootEffect" value="poison"/>
      <attribute key="areaEffect" value="poff"/>
    </attack>
  </attacks>
  <defenses armor="15" defense="17">
    <defense name="speed" interval="1000" chance="13" speedchange="318" duration="5000">
      <attribute key="areaEffect" value="redshimmer"/>
    </defense>
  </defenses>
  <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="0"/>
    <immunity poison="1"/>
    <immunity lifedrain="0"/>
    <immunity paralyze="1"/>
    <immunity outfit="1"/>
    <immunity drunk="1"/>
    <immunity invisible="0"/>
  </immunities>
  <loot>
    <item id="2148" countmax="15" chance="25000"/> gold coin-very easy
    <item id="2478" chance="7000"/> brass legs-easy
    <item id="2463" chance="500"/> plate armor-rare
    <item id="2510" chance="7000"/> plate shield-easy
    <item id="2457" chance="7000"/> steel helmet-easy
    <item id="2169" chance="200"/> time ring-very rare
    <item id="2148" countmax="15" chance="25000"/> gold coin-very easy
    <item id="7720" chance="500"/> sacred paper-rare
  </loot>
</monster>
 
Last edited:
--Other version:

Script1:
PHP:
    <action itemid="7720" script="t_s_p.lua" />
Script2:
PHP:
local smonster = tarantula
local monster = smonster
local summon = doSummonCreature(monster, fromPos)

function onUse(cid, item, fromPos)
    if item.itemid == 7720 then
        doCreatureSay(cid, getCreatureName(cid).." summoned a "..monster..".", TALKTYPE_ORANGE_1)
        doConvinceCreature(cid, summon)
        doRemoveItem(item.uid, 1)
    end
    return TRUE
end

 
You dont need to declare 1 thing in two lines.

PHP:
local monster = "tarantula"

function onUse(cid, item, fromPos)
    if item.itemid == 7720 then
        local summon = doSummonCreature(monster, fromPos)
        doCreatureSay(cid, "'..getCreatureName(cid)..' summoned a '..monster..'.", TALKTYPE_ORANGE_1)
        doConvinceCreature(cid, summon)
        doRemoveItem(item.uid, 1)
    end
    return TRUE
end
 
Last edited:
yes..



=)




Script:
PHP:
local monster = "tarantula"
local playerPos = getCreaturePosition(cid)

function onUse(cid, item, fromPos)
    if item.itemid == 7720 then
        local summon = doSummonCreature(monster, playerPos)
        doCreatureSay(cid, getCreatureName(cid).." summoned a "..monster..".", TALKTYPE_ORANGE_1) 
        doConvinceCreature(cid, summon)
        doRemoveItem(item.uid, 1)
    end
    return TRUE
end
 
Last edited:
Code:
local monster = "tarantula"

function onUse(cid, item, fromPos)
local playerPos = getCreaturePosition(cid)
    if item.itemid == 7720 then
        summon = doSummonCreature(monster, playerPos)
        doCreatureSay(cid, getCreatureName(cid).." summoned a "..monster..".", TALKTYPE_ORANGE_1) 
        doConvinceCreature(cid, summon)
        doRemoveItem(item.uid, 1)
    end
    return TRUE
end
 
Alright, try this now :p
PHP:
local monsters = { 
    [7720] = "tarantula", 
    [7722] = "rotworm", 
    [7844] = "cyclops", 
    [7845] = "troll", 
    [7846] = "dark monk" 
} 

function onUse(cid, item, fromPos) 
    local monster = monsters[item.itemid] 
    if monster then 
        local summon = doSummonCreature(monster, getCreaturePosition(cid)) 
        doCreatureSay(cid, getCreatureName(cid).." summoned a "..monster..".", TALKTYPE_ORANGE_1) 
        doConvinceCreature(cid, summon) 
        doRemoveItem(item.uid, 1) 
    end 
    return TRUE 
end

Also, please remember: You cannot declare variables with value "getCreaturePosition(cid)" outsite onUse! Because there is no cid there!
 

It says creature not found!!! Just read and you have found you problem...

1. The creature you are searching for doesnt exist
2. You did wrote something wrong (tarantula isnt the same as Tarantula)

That means if you take a look into the tarantula.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Tarantula" nameDescription="a tarantula" race="venom" experience="120" speed="214" manacost="485">
	<health now="225" max="225"/>
	<look type="219" head="0" body="0" legs="0" feet="0" corpse="4320"/>
	<targetchange interval="2000" chance="5"/>
	<strategy attack="70" defense="0"/>
	<flags>
		<flag summonable="1"/>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag illusionable="1"/>
		<flag convinceable="1"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="0"/>
		<flag targetdistance="1"/>
		<flag runonhealth="0"/>
	</flags>
	<attacks>
		<attack name="melee" interval="2000" skill="40" attack="38" poison="30"/>
		<attack name="poisonfield" interval="1000" chance="20" range="1">
			<attribute key="shootEffect" value="poison"/>
			<attribute key="areaEffect" value="poff"/>
		</attack>
	</attacks>
	<defenses armor="20" defense="20">
		<defense name="speed" interval="1000" chance="13" speedchange="634" duration="2000">
			<attribute key="areaEffect" value="redshimmer"/>
		</defense>
	</defenses>
	<immunities>
		<immunity physical="0"/>
		<immunity energy="0"/>
		<immunity fire="0"/>
		<immunity poison="1"/>
		<immunity lifedrain="0"/>
		<immunity paralyze="0"/>
		<immunity outfit="0"/>
		<immunity drunk="0"/>
		<immunity invisible="0"/>
	</immunities>
	<loot capacity="600">
		<item id="2478" countmax="1" chance="3000"/>
		<item id="2148" countmax="10" chance="70000"/>
		<item id="2148" countmax="30" chance="30000"/>
		<item id="2510" countmax="1" chance="2000"/>
		<item id="2457" countmax="1" chance="1000"/>
		<item id="2169" countmax="1" chance="100"/>
	</loot>
</monster>

<monster name="Tarantula" nameDescription="a tarantula" race="venom" experience="120" speed="214" manacost="485">

The name is Tarantula not tarantula (use correct Syntax)
name is a variable contains a String (word) and you need to put all Signs correct anywhere else if you will use it there ;)
 
You are wrong Virgel. It says creature not found for doConvinceCreature, not for doSummonCreature ;)

That means, doSummonCreature didn't work, therefore doConvinceSummon will have no summon.
 
Back
Top