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

[NPC] Promoter

Bloumer

New Member
Joined
Dec 12, 2008
Messages
198
Reaction score
0
Hi all.
I need npc who give new profession. From elder druid , master sorc , elite knight and royal paladin to: priest, witcher, gladiator and sniper for TFS 0.2 mystic. For get this profession player need too 5 days PACC and 100 lvl. Can someone give me that script?
 
I can't get a second promotion to work at all.. I've edited the names like "epic master sorcerer" in the vocation.xml to something else. But then when I go in the phpmyadmin to players, and set promotion to 2, it will show in-game like "You see yourself. You are ."

And then in the phpmyadmin it will show at vocations a 0... while it was on 1.

Is there any other place where I need to edit the names of the second promotions or?
 
You have to reload vocations at database. You can do that in config.ini

C:\xampp\htdocs\config

Code:
vocations_list = "None,Sorcerer,Druid,Paladin,Knight,Master Sorcerer,Elder Druid,Royal Paladin,Elite Knight,epic Knight,epic Paladin,epic Druid,epic Sorcerer"

and change epic x to what you want.


/Elaney
 
Well, I didn't have it like you.. but I found these two lines in the config.php @ xampp/htdocs/config.php

PHP:
$vocation_name[0] = array(0 => 'None', 1 => 'Sorcerer', 2 => 'Druid', 3 => 'Paladin', 4 => 'Knight'); // id => 'name' , $vocation_name[0] - promotion level 0
$vocation_name[1] = array(1 => 'Master Sorcerer', 2 => 'Elder Druid', 3 => 'Royal Paladin', 4 => 'Elite Knight'); // id => 'name' , $vocation_name[1] - promotion level 1
$vocation_name[2] = array(1 => 'Bla Sorcerer', 2 => 'Bla Druid', 3 => 'Bla Paladin', 4 => 'Bla Knight'); // id => 'name' , $vocation_name[2] - promotion level 2

Now, I have ADDED the $vocation_name[2] , it didn't exist at all. But will this also fix that you will see in-game what vocation it is? Since this is only for the website.. :p

Sincerely,
UpAndDown!

EDIT:
On the website it's working now;
Profession: Bla Knight
however, in game you still see "13:10 You see yourself. You are ."

How can I fix this?
 
Last edited:
UpAndDown i need script.lua for my NPC no need do something in config.php .. i wanna script for NPC who will be look like this:
Hi
npc"Hi |PLAYER|
profession gladiator
yes
NPC: u dont have 7 days PACC and u dont have first promotion(elder itp.) and u need 100 lvl

if ok

then u are gladiator and take 20cc :)

I make my vocations with ID 20+ and change this in phpmyadmin and this work nice. You see yourself.You are Gladiator.
 
I've tried about everything now, and I finally got it to work by putting the vocation ID to 12, and the promotion to 0. However, is it possible to have it so that vocation ID is still 4, and then promotion set to 2?

Since now people can be stupid, and ask for promotion at the king, and then they will have no vocation again. "17:02 You see yourself. You are ."

Also, how do I make a NPC that sets your vocation ID to 12?
 
For the potions:
Edit these functions in function.lua
PHP:
function isSorcerer(cid)
	if(isPlayer(cid) == FALSE) then
		debugPrint("isSorcerer: Player not found.")
		return false
	end

	return (isInArray({1,5}, getPlayerVocation(cid)) == TRUE)
end

function isDruid(cid)
	if(isPlayer(cid) == FALSE) then
		debugPrint("isDruid: Player not found.")
		return false
	end

	return (isInArray({2,6}, getPlayerVocation(cid)) == TRUE)
end

function isPaladin(cid)
	if(isPlayer(cid) == FALSE) then
		debugPrint("isPaladin: Player not found.")
		return false
	end

	return (isInArray({3,7}, getPlayerVocation(cid)) == TRUE)
end

function isKnight(cid)
	if(isPlayer(cid) == FALSE) then
		debugPrint("isKnight: Player not found.")
		return false
	end

	return (isInArray({4,8}, getPlayerVocation(cid)) == TRUE)
end

Add the ids of your new vocations to the arrays.
 
Back
Top