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

Solved 2 questions

Cornwallis

Member
Joined
Jan 3, 2010
Messages
480
Reaction score
16
Ok, I have a few questions about multiple things that I would like to be done. First of all, I was working on a 0.2.11pl1 OT, but since 0.3 has more features I decided to convert. Until 0.3.7 is stable, I decided to use my favorite client version, which means I've downgraded to 0.3.1pl2 ( 8.40 ). I'm having a hard time with the coding for this, so I'm just gonna get support from all you lovely people :P

1) I wanted to change the skill caps, like how magic level stops at like 156 in newer clients, I'm not sure if that applies for this but if so, but I want to raise the skill cap for all of the skills, maybe up to 254 since that is when it overlaps. If i didn't state this clearly, please ask. -- vocations.cpp, changed the skill try and mana spent req formulas. and changed the multipliers in vocations.xml to 1.075 instead of 1.1 :D

2) I wanted to set some kind of death or login function so that if the player has a white skull or red skull, and dies, that's the only time they lose experience. I figure this way, most people will consider it risky to kill other players because they can come back and yellow skull on them, and lose nothing. -- http://otland.net/f16/0-3-1pl2-tp-death-160103/#post1540953

Thanks in advance,
Cornwallis.
 
Last edited:
Script#5 - I did not fix it, but I shortened it, it had too many unnecessary "if" statements. one if statement to do them all!
LUA:
local newPos = {x = 1000, y = 1000, z = 7} 
local t = {
    [23001] = {1, 2190, 'You have recieved a Wand of Vortex ( Magic-level based ) to start your journey as a Sorcerer! Good luck.'},
    [23002] = {2, 2182, 'You have recieved a Snakebite Rod ( Club-fighting based ) to start your journey as a Druid! Good luck.'},
    [23003] = {3, 2389, 'You have recieved a spear ( Distance-fighting based ) to start your journey as a Paladin! Good luck.'},
    [23004] = {4, 2412, 'You have recieved a sword ( Sword-fighting based ) to start your journey as a Knight! Good luck.'},
    [23005] = {5, 2190, 'You have recieved a axe ( Axe-fighting based ) to start your journey as a Butcher! Good luck.'}
}

function onUse (cid, item, fromPosition, itemEx, toPosition) 
    local _e = t[item.actionid]
    if _e then 
        doPlayerSetVocation (cid, _e[1]) 
        doPlayerAddItem (cid, _e[2]) 
        doTeleportThing(cid, newPos, false) 
        doSendMagicEffect(cid, CONST_ME_TELEPORT) 
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, _e[3]) 
    end  
    return true
end
 
Thank you for shortening it, I'm not sure why it doesn't work though. Is there somewhere else I should be registering action id's instead of actions.xml? Or maybe if i make the first_items.xml script give 5 items, each one picks a different vocation and gets rid of the other 4, maybe then it would be easier to configure? This is what's in my actions.xml
Code:
	<action actionid="20001" script="other/start_voc.lua"/>
	<action actionid="20002" script="other/start_voc.lua"/>
	<action actionid="20003" script="other/start_voc.lua"/>
	<action actionid="20004" script="other/start_voc.lua"/>
	<action actionid="20005" script="other/start_voc.lua"/>
I tried: <action actionid="20001-20005" script="other/start_voc.lua" but i'm not sure if that would work in this version.
 
Back
Top