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

2 requests ( 1 is good idea for RPG!)

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,839
Solutions
18
Reaction score
618
Location
Poland
Hello.
I have small requests for you.

1) An spell or talkaction called absorb (absorbing corpses of monsters):
- Only vocation 1 and 2 can use it (please make it configurable [i can add/remove vocations who can absorb]
- You have 30 absorbs and you get storage 3405 after this you can absorb 50 and get 3406 storage , after 70 get 3407 etc.
- If you write "absorb" you absorbing corpses in north of player (1 sqm up than player stand)
- It takes 150 mana


2) Movement - (IDEA) Ship.
- If you stand on certain floor (movement script) it says:
" The ship doesnt come now, please back later..."
The ship is arriving in 20 minutes and leaving in 5 minutes.
- If ship is, the floor teleport you on ship (X,Y,Z)
- You must wait in ship 1 minute (globalevents [check area] but idk how to make it), after that you will teleported to X,Y,Z and arrive message: "Your trip finished succesfully, welcome in Island"


Regards,
Hope you will make it!
Fresh.
Rep++ :)
 
1 -
Lua:
function onCastSpell(cid,var)
doRemoveItem(getPlayerLookPos(cid), 1)
doCreatureAddMana(cid, 150)
doSendMagicEffect(getPlayerLookPos(cid), 12)
return true
end

I do not catched the storages idea.
 
Look KylerXX,
You have 0 absorbed corpses if you create character (dont have storage)
If you absorbed 1 / 30 corpses its says: "You absorbed 1 of 30 corpses" and give you storage: example: 3506,1
If you absorb 2 / 30 it says : You absorbed 2 of 30 corpses and give you storage +1 = 3506,2
etc...
Finally if you absorbed 30 corpses it say: "You absorbed all corpses you can go to NPC Harold" and gives u storage 3600

Can you update your script please ? ;d
 
Try this talkaction:
Lua:
function onSay(cid,words,param,channel)
local absorbsto = 3506
	if isInArray({1,2}, getPlayerVocation(cid) then
		if getItemInfo(getThingFromPos(getPlayerLookPos(cid)).itemid).corpseType then
			if getPlayerStorageValue(cid, absorbsto) == 31 then
				doPlayerSendCancel(cid, "You have arrived to 30, you cant execute more absorbs.")
			elseif getPlayerStorageValue(cid, absorbsto) == 30 then
				setPlayerStorageValue(cid, 3600, 1)
                                setPlayerStorageValue(cid, absorbsto, getPlayerStorageValue(cid, absorbsto)+1)
			elseif  getPlayerStorageValue(cid, absorbsto) <= 29 then
				doPlayerSendTextMessage(cid,22,"You absorbed all corpses you can go to NPC Harold")
				doRemoveItem(getPlayerLookPos(cid).uid, 1)
				doPlayerSendTextMessage(cid,22,"You absorbed ".. getPlayerStorageValue(cid, absorbsto) .." of 30 corpses")
				setPlayerStorageValue(cid, absorbsto, getPlayerStorageValue(cid, absorbsto)+1)
				doCreatureAddMana(cid, 150)
				doSendMagicEffect(getPlayerLookPos(cid), 12)
			end
                else
                       doPlayerSendCancel(cid, "This item there isnt a corpse.")
		end
      else
             doPlayerSendCancel(cid, "You dont have the required vocation.")
      end
return 0
end
 
Last edited:
Works great. But if i want to add absorbs after going to NPC Harold i have 30555 storage, and next mission is absorb 70 corpses. Where i can add more of corpses (next stage) ?
 
Try this script, I do it fast.
Lua:
function onSay(cid,words,param,channel)
local si = {
[3506] = {30, 29, 31, 3600}, -- first stage
[3507] = {70, 69, 71, 3601} -- secon stage
}
local s = si[i]
local absorbsto = 3506
	if isInArray({1,2}, getPlayerVocation(cid)) then
		if getItemInfo(getThingFromPos(getPlayerLookPos(cid)).itemid).corpseType then
			for i = 3506, 3507 do 
				if getPlayerStorageValue(cid, i) == 1 then
					if getPlayerStorageValue(cid, i) == s[3] then
						doPlayerSendCancel(cid, "You have arrived to ".. s[1] ..", you cant execute more absorbs.")
					elseif getPlayerStorageValue(cid,i) == s[1] then
						setPlayerStorageValue(cid, s[4], 1)
		                setPlayerStorageValue(cid, s, getPlayerStorageValue(cid,s)+1)
					elseif getPlayerStorageValue(cid,i) <= s[2] then
						doPlayerSendTextMessage(cid,22,"You absorbed all corpses you can go to NPC Harold")
						doRemoveItem(getPlayerLookPos(cid).uid, 1)
						doPlayerSendTextMessage(cid,22,"You absorbed ".. getPlayerStorageValue(cid, s) .." of ".. s[1] .." corpses")
						setPlayerStorageValue(cid, s, getPlayerStorageValue(cid,s)+1)
						doCreatureAddMana(cid, 150)
						doSendMagicEffect(getPlayerLookPos(cid), 12)
					end
				end
			end
		else
            doPlayerSendCancel(cid, "This item there isnt a corpse.")
		end
    else
        doPlayerSendCancel(cid, "You dont have the required vocation.")
    end
return 0
end
 
I correct the script because in this condition:
Lua:
if getPlayerStorageValue(cid, i) == 1 then

I put 1, and is 0, because the NPC actives absorb stage putting 0, if I put 1 then I present an absorb, hehe :)
Correction:
Lua:
function onSay(cid,words,param,channel)
local si = {
[3506] = {30, 29, 31, 3600}, -- first stage
[3507] = {70, 69, 71, 3601} -- secon stage
}
local s = si[i]
local absorbsto = 3506
	if isInArray({1,2}, getPlayerVocation(cid)) then
		if getItemInfo(getThingFromPos(getPlayerLookPos(cid)).itemid).corpseType then
			for i = 3506, 3507 do 
				if getPlayerStorageValue(cid, i) >= 0 then
					if getPlayerStorageValue(cid, i) == s[3] then
						doPlayerSendCancel(cid, "You have arrived to ".. s[1] ..", you cant execute more absorbs.")
					elseif getPlayerStorageValue(cid,i) == s[1] then
						setPlayerStorageValue(cid, s[4], 1)
		                setPlayerStorageValue(cid, s, getPlayerStorageValue(cid,s)+1)
					elseif getPlayerStorageValue(cid,i) <= s[2] then
						doPlayerSendTextMessage(cid,22,"You absorbed all corpses you can go to NPC Harold")
						doRemoveItem(getPlayerLookPos(cid).uid, 1)
						doPlayerSendTextMessage(cid,22,"You absorbed ".. getPlayerStorageValue(cid, s) .." of ".. s[1] .." corpses")
						setPlayerStorageValue(cid, s, getPlayerStorageValue(cid,s)+1)
						doCreatureAddMana(cid, 150)
						doSendMagicEffect(getPlayerLookPos(cid), 12)
					end
				end
			end
		else
            doPlayerSendCancel(cid, "This item there isnt a corpse.")
		end
    else
        doPlayerSendCancel(cid, "You dont have the required vocation.")
    end
return 0
end
 

Similar threads

Back
Top