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

Need Scripts

simkal

New Member
Joined
Jan 21, 2010
Messages
361
Reaction score
3
1. Starter Items. i have tried search, but didnt find, anyone can help me?

2. Reward when killing someone. i have tried search, but didnt find, anyone can help me?
 
you can find these scripts so easy, just learn how to use the search function. in example, i found my post by searching 'first items'.
first go to data/creature script/scripts

Code:
local commonItems = {
  -- ITEMS ALL VOCS RECEIVE          -- all vocs will recive this items
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items},  
}

local firstItems = {
  { -- SORC ITEMS           --sorc items
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items},  
  },
  { -- DRUID ITEMS              --druid items
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items},   
  },
  { -- PALADIN ITEMS    --pala items
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items},  
  },
  { -- KNIGHT ITEMS      --knight items
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items}, 
    {itemid=here the id of item, count=here how much items},  
  }
}

for _, items in ipairs(firstItems) do
  for _, item in ipairs(commonItems) do
    table.insert(items, item)
  end
end

function onLogin(cid)
  if getPlayerGroupId(cid) < 4 then
    local hasReceivedFirstItems = getPlayerStorageValue(cid, 6771408)

    if hasReceivedFirstItems ~= 1 then
      --[[local backpack = ]]doPlayerAddItem(cid, 1988, 1)

      local giveItems = firstItems[getPlayerVocation(cid)]

      if giveItems ~= nil then
        for _, v in ipairs(giveItems) do
          --doAddContainerItem(backpack, v.itemid, v.count or 1)
          doPlayerAddItem(cid, v.itemid, v.count or 1)
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved your first items!")
      end
      setPlayerStorageValue(cid, 67708, 1)
    end
  end
  return TRUE
end


then go to data\creature script \creaturescript.xml

<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>

LUA:
function onKill(cid, target)
        if isPlayer(target) == TRUE then
		if getPlayerIp(cid) ~= getPlayerIp(target) then
        loot = 2152 
	  item = doPlayerAddItem(cid,loot,1)
	elseif getPlayerName(cid) == getPlayerName(target) then
	  doPlayerAddItem(cid,loot,1)
else
		doPlayerAddExperience(cid, -1000000)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
        end
end
        return TRUE
end
LUA:
	<event type="kill" name="FragReward" event="script" value="fragreward.lua"/>
 
Back
Top