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

Lua How to make the text private then public?

Lunarzz

New Member
Joined
Jan 23, 2015
Messages
45
Reaction score
0
Hello I am using techmans monsterhunter script, where you automatically have a task for yourself and the problem I got with it is that when someone kill a monster it will be shown in public, so everyone can see it and I think that is really annoying.

If anyone would have any spare time to help me make so you get it like in default chat like this
"You killed 1 / 100 draken warmasters" Also if possible could someone help me make so you can kill more monsters like on this script. I want it so you can kill (draken spellweavers and draken warmasters)


function onKill(cid, target)

local config = {
monstername = "Draken Warmaster", -- monster name
needeedkills = 100, -- kills needed to complete quest
reward1 = 2160, -- first reward id
reward1count = 1, -- first reward count
effect = 15, -- effect used after completing quest
storage = 123553, -- storage of kills
hunterstorage = 12354, -- storage of completed quest
pos = getPlayerPosition(cid) -- replacement for cid is target
}
if(isMonster(target) == TRUE) then
if getCreatureName(target) == config.monstername then
if getPlayerStorageValue(cid, config.storage) == config.needeedkills-1 and getPlayerStorageValue(cid,config.hunterstorage) == -1 then
doCreatureSay(cid, "You killed "..config.needeedkills.." "..config.monstername..", you're a real "..config.monstername.." hunter. Here is your reward.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,config.hunterstorage,1)
doSendMagicEffect(config.pos, config.effect)
doPlayerAddItem(cid,config.reward1,config.reward1count)
medal = doPlayerAddItem(cid,config.wrightablereward,1)
doSetItemSpecialDescription(medal, "This medal was given to "..getPlayerName(cid).." for killing "..config.needeedkills.." "..config.monstername.." and becoming a real "..config.monstername.." hunter.")
elseif getPlayerStorageValue(cid, config.storage) < config.needeedkills-1 then
setPlayerStorageValue(cid, config.storage,(getPlayerStorageValue(cid, config.storage))+1)
doCreatureSay(cid, "You need to kill "..config.needeedkills-getPlayerStorageValue(cid, config.storage).." "..config.monstername.." to become a "..config.monstername.." hunter.", TALKTYPE_ORANGE_1)
end
end
end
return TRUE
end





... Thanks in advance, yours Lunar!
 
Change doCreatureSay to doPlayerSendTextMessage and add the type after cid.
To add more monsters you can do it like this.
http://otland.net/threads/npc-mission.211063/#post-2022378
Add the monsters to a table and get the information from the table.
You can also use that script, then just add the missing things in the table and remove the npc storage part.
To get the values you can use monster.reward1, monster.wrightablereward, etc then
 
Change doCreatureSay to doPlayerSendTextMessage and add the type after cid.
To add more monsters you can do it like this.
http://otland.net/threads/npc-mission.211063/#post-2022378
Add the monsters to a table and get the information from the table.
You can also use that script, then just add the missing things in the table and remove the npc storage part.
To get the values you can use monster.reward1, monster.wrightablereward, etc then

Thanks for help, I will do my best, as i'm pretty new in this advanced lua things! Last time I was scripting was like 5-6 years ago!
Also I wonder, is it possible that you could edit my script so I know what to change etc?


Yours, Lunar!
 
Back
Top Bottom