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

3 Small Requests. REPP++

Rthom19

New Member
Joined
Mar 2, 2009
Messages
50
Reaction score
0
Location
Australia
Number One:
I need an onLogin script so that when you log in it'll get your town id and send you there.

Example:
You log out in trainers but when you log in you'll be at your home town.


Number Two:
I need a broadcast script for players that when used only the same vocation can see.

Example:
A druid says !broadcast Exiva Me Fast
[Druid]: Exiva Me Fast.
That will only be visible to vocations 1 and 2 (Sorc and Druid)
and
A knight says !broadcast Come to me
[Knight]: Come to me
Only visible by vocation ids 3 and 4(Pally and Knight)
Also it should have a 1 min usage time to avoid spamming.


Number Three:
I need a script so that when a certain monster dies, a certain voaction dies.

Example:
A team of Knights and Pallys go and kill a boss called "Mage Boss" when the mage boss dies i want all people with voaction id 1 and 2(Sorc and Druid) to die also.
Also it should broadcast how many people died..
"23 Mages Were Killed."

Thanks Alot ;D
 
ok look here it is if you want to make with vocation id (1,2,3,4,5,6,7,8,9,10) to put your custom vocation
Code:
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "cat")
if (string.lower(getCreatureName(cid)) == "cat") then
        for _, player in ipairs(getPlayersOnline()) do
            [B]if getPlayerVocation(player) == 2 or getPlayerVocation(player) == 1 then[/B]
                doCreatureAddHealth(player, -getCreatureHealth(player))
 
            end
        end
    end
    return true
end

at the bold line the place where ypu can find numbers in it is the id <1> and <2> ok you change tgis to ur desired id
 
I forgot about the broadcast script..

i get this error:

Code:
[27/09/2009 02:11:55] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/playerbroadcast.lua)
[27/09/2009 02:11:55] data/talkactions/scripts/playerbroadcast.lua:19: 'do' expected near 'if'
 
Anyone know how to fix? :/

Also can it be made so all vocs can use but depending on the persons voc to who it broadcasts too?

E.G.
A Person with voc 1, 2 or 3 uses !broadcast MESSAGE and that only shows to other people with voc 1, 2 and 3.
Same with voc 4, 5 and 6.
7,8 and 9.
and 10, 11 and 12.
 
Back
Top