What's new

First items

Status
Not open for further replies.

Volti

Active User
Joined
Apr 5, 2008
Messages
86
Reaction score
1
Hello i will gift for us i think the best first items mod for Example: real map without webPage or any low rate's server who dont got a sample character with thoose items your character will start very good...
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Apsivaflines" contact="antica.sytes.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- Rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coints
doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2190, 1) -- wand of wortex
doPlayerAddItem(cid, 8819, 1) -- magician's robe
doPlayerAddItem(cid, 8820, 1) -- mage hat
doPlayerAddItem(cid, 2468, 1) -- studded legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2182, 1) -- snakebite rod
doPlayerAddItem(cid, 8819, 1) -- magican's robe
doPlayerAddItem(cid, 8820, 1) -- mage hat
doPlayerAddItem(cid, 2468, 1) -- studded legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doPlayerAddItem(cid, 2389, 1) -- spear
doPlayerAddItem(cid, 2456, 1) -- bow
doPlayerAddItem(cid, 2544, 100) -- 100 arrows
doPlayerAddItem(cid, 2660, 1) -- hidden turban
doPlayerAddItem(cid, 2480, 1) -- legion helmet
doPlayerAddItem(cid, 8923, 1) -- ranger legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doAddContainerItem(bag, 2439, 1) -- daramanian mace
doAddContainerItem(bag, 8601, 1) -- steel axe
doPlayerAddItem(cid, 2509, 1) -- steel shield
doPlayerAddItem(cid, 8602, 1) -- jagged sword
doPlayerAddItem(cid, 2465, 1) -- brass armor
doPlayerAddItem(cid, 2481, 1) -- soldier helmet
doPlayerAddItem(cid, 2478, 1) -- brass legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
end
end
return TRUE
end
]]></event>
</mod>
if script not working then are only one problem with your playerStorage By sure you not using 50000 storage.
if you using 0.2.~ and feel free to use it as creatureScripts
firstitems.lua
function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1 then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- Rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coints
doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2190, 1) -- wand of wortex
doPlayerAddItem(cid, 8819, 1) -- magician's robe
doPlayerAddItem(cid, 8820, 1) -- mage hat
doPlayerAddItem(cid, 2468, 1) -- studded legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2182, 1) -- snakebite rod
doPlayerAddItem(cid, 8819, 1) -- magican's robe
doPlayerAddItem(cid, 8820, 1) -- mage hat
doPlayerAddItem(cid, 2468, 1) -- studded legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doPlayerAddItem(cid, 2389, 1) -- spear
doPlayerAddItem(cid, 2456, 1) -- bow
doPlayerAddItem(cid, 2544, 100) -- 100 arrows
doPlayerAddItem(cid, 2660, 1) -- hidden turban
doPlayerAddItem(cid, 2480, 1) -- legion helmet
doPlayerAddItem(cid, 8923, 1) -- ranger legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doAddContainerItem(bag, 2439, 1) -- daramanian mace
doAddContainerItem(bag, 8601, 1) -- steel axe
doPlayerAddItem(cid, 2509, 1) -- steel shield
doPlayerAddItem(cid, 8602, 1) -- jagged sword
doPlayerAddItem(cid, 2465, 1) -- brass armor
doPlayerAddItem(cid, 2481, 1) -- soldier helmet
doPlayerAddItem(cid, 2478, 1) -- brass legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
end
end
return TRUE
end
And creatureScripts.xml
<event type="login" name="FirstItems" script="firstitems.lua"/>
Feel Free to rep me :p


W?a?ciwie to szukam pomocy, chcia?em zrobi? first items, lecz mam rookgard i jest taka mo?liwo?? ?eby te itemy by?y tylko na tzw. Mainland'zie??
 

Talented

Active User
Joined
Dec 12, 2009
Messages
51
Reaction score
6
Odp: First items

Oczywi?cie, ?e si? da... A oto skrypt:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="Apsivaflines" contact="antica.sytes.net" enabled="yes">
<config name="firstitems_config"><![CDATA[
]]></config>
<event type="login" name="FirstItems" event="script"><![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
if getPlayerGroupId(cid) == 1 and getPlayerStorageValue(cid, 50000) == -1
elseif getPlayerLevel(cid,8) then
if isSorcerer(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- Rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coints
doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2190, 1) -- wand of wortex
doPlayerAddItem(cid, 8819, 1) -- magician's robe
doPlayerAddItem(cid, 8820, 1) -- mage hat
doPlayerAddItem(cid, 2468, 1) -- studded legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isDruid(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doPlayerAddItem(cid, 2175, 1) -- spellbook
doPlayerAddItem(cid, 2182, 1) -- snakebite rod
doPlayerAddItem(cid, 8819, 1) -- magican's robe
doPlayerAddItem(cid, 8820, 1) -- mage hat
doPlayerAddItem(cid, 2468, 1) -- studded legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isPaladin(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doPlayerAddItem(cid, 2389, 1) -- spear
doPlayerAddItem(cid, 2456, 1) -- bow
doPlayerAddItem(cid, 2544, 100) -- 100 arrows
doPlayerAddItem(cid, 2660, 1) -- hidden turban
doPlayerAddItem(cid, 2480, 1) -- legion helmet
doPlayerAddItem(cid, 8923, 1) -- ranger legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
elseif isKnight(cid) then
local bag = doPlayerAddItem(cid, 1988, 1)
doAddContainerItem(bag, 2120, 1) -- rope
doAddContainerItem(bag, 2554, 1) -- shovel
doAddContainerItem(bag, 2152, 50) -- 50 platinum coins
doAddContainerItem(bag, 2439, 1) -- daramanian mace
doAddContainerItem(bag, 8601, 1) -- steel axe
doPlayerAddItem(cid, 2509, 1) -- steel shield
doPlayerAddItem(cid, 8602, 1) -- jagged sword
doPlayerAddItem(cid, 2465, 1) -- brass armor
doPlayerAddItem(cid, 2481, 1) -- soldier helmet
doPlayerAddItem(cid, 2478, 1) -- brass legs
doPlayerAddItem(cid, 2643, 1) -- leather boots
doPlayerAddItem(cid, 2173, 1) -- amulet of loss
doPlayerAddPremiumDays(cid, 350) -- automaticly 350 premmium days for servers who dont got free premmium function in config.lua Example: Chronic Elements
setPlayerStorageValue(cid, 50000, 1)
end
end
return TRUE
end
]]></event>
</mod>

Wystarczy?o doda? 1 linijk? do tych skrypt?w kt?re poda?e?... A mianowicie:
Code:
elseif getPlayerLevel(cid,8) then

Pozdrawiam~
~Talented
 
Status
Not open for further replies.
Top