Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
hello guys I was looking for the bed training system, and I didn't find it, and I touched the sources I own and I found the bed training (part of the system) because my otx has remnants of the system, even though 8.6 it is a 9.7 - 9.6 - degrownd I think it works exactly like the last updated distribution in github's otx 8.6. so if someone who understands C ++ can help me and help with the part of the code that can be adapted for the beds, I would be very grateful!
Maybe something like this (You can edit or change ids/skill by yourself), As long as I know its not possible to make modal window in 8.6 but maybe someone else will be able to help you doing it.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local beds = {1754,1755,1756,1757,1758,1759,1760,1761,7815,7816,7817,1765,7787,7788,7789,7790,7791,7792,7811,7812,7813,7814}
local knight = {4, 8}
local pally = {3, 7}
local mage = {1, 2, 5, 6}
if(isInArray(beds, itemEx.itemid)) and isInArray(knight, getPlayerVocation(cid)) == TRUE then -- sword
doCreatureSetStorage(cid, 62669, SKILL_SWORD)
elseif(isInArray(beds, itemEx.itemid)) and isInArray(mage, getPlayerVocation(cid)) == TRUE then -- mlvl
doCreatureSetStorage(cid, 62669...
THANK YOU ! HOWEVER, IT'S A QUESTION. WILL THIS ALLOW ME TO CHOOSE SKILL BY CLICKING THE BED?
AND THE VALUE CAN BE ANYONE? IN STORAGE?
i have make this edit :
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == your 1754) then
doCreatureSetStorage(cid, 780001, SKILL_AXE)
elseif(item.itemid == your 1754) then
doCreatureSetStorage(cid, 780001, SKILL_SWORD)
elseif(item.itemid == your 1754) then
doCreatureSetStorage(cid, 780001, SKILL_MAGLEVEL)
elseif(item.itemid == your 1754) then
doCreatureSetStorage(cid, 780001, SKILL_CLUB)
elseif(item.itemid == your 1754) then
doCreatureSetStorage(cid, 780001, SKILL_DITANCE)
end
if item.actionid == 1754 then
doRemoveCreature(cid)
end
return true
end
No it can't be in any storage that depends on your offline training script and yes you can choose what skills it will give depending on each vocation by this function
okay, are you telling me to make the script recognize the vocation and then he select the skill id alone? before checking the van id and then selecting the skill? - my server does not have a script for offline trainer, I made it from 0 from the base folder of otx. so it is clean, it has only the systems that I have already installed. I have no idea how to edit beyond that I already did!
my server dont have script for offline trainer, i have look my sources cod , and i check the codes and remnants of the system has implanted , this codes has register the functions base, but, i dont know make the sistem based on this codes, i can send pm to you , for u help me ok?
I will help here so others can benefit also, just try adding any of those scripts with the the playevocation function I posted above then if you got any errors/issues post it here and I will try to help you.
Hello i do not know if anyone else has posted this, If so please let me know and ill remove it. Data/Actions/Actions.xml --Offline Training-- Data/Actions/Scripts/Others/offlinetraining.lua function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 1444) then --...
I appreciate your help, but for example these systems put different statues for training, I would like to put it that way in beds, you click to sleep and it appears the window to choose which skill you want to train.
the script of actions here =
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == 1444) then -- sword
doCreatureSetStorage(cid, 62669, SKILL_SWORD)
elseif(item.itemid == 10349) then -- axe
doCreatureSetStorage(cid, 62669, SKILL_AXE)
elseif(item.itemid == 8834) then -- mlvl
doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL)
elseif(item.itemid == 8626) then -- club
doCreatureSetStorage(cid, 62669, SKILL_CLUB)
elseif(item.itemid == 10353) then -- distannce
doCreatureSetStorage(cid, 62669, SKILL_DISTANCE)
end
if item.actionid == 1000 then
doRemoveCreature(cid)
end
return true
end
I Dont Know where Add this line
if (getPlayerVocation(cid) == vocationnumberhere)
this =
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == 1754) then -- sword
elseif(getPlayerVocation(cid) == 4)
doCreatureSetStorage(cid, 62669, SKILL_SWORD)
end
if(item.itemid == 1754) then -- axe
elseif(getPlayerVocation(cid) == 4)
doCreatureSetStorage(cid, 62669, SKILL_AXE)
end
if(item.itemid == 1754) then -- mlvl
elseif (getPlayerVocation(cid) == 1)
doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL)
end
if(item.itemid == 1754) then -- mlvl
elseif (getPlayerVocation(cid) == 2)
doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL)
end
if(item.itemid == 1754) then -- club
elseif(getPlayerVocation(cid) == 4)
doCreatureSetStorage(cid, 62669, SKILL_CLUB)
if(item.itemid == 1754) then -- distannce
elseif(getPlayerVocation(cid) == 3)
doCreatureSetStorage(cid, 62669, SKILL_DISTANCE)
Maybe something like this (You can edit or change ids/skill by yourself), As long as I know its not possible to make modal window in 8.6 but maybe someone else will be able to help you doing it.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local beds = {1754,1755,1756,1757,1758,1759,1760,1761,7815,7816,7817,1765,7787,7788,7789,7790,7791,7792,7811,7812,7813,7814}
local knight = {4, 8}
local pally = {3, 7}
local mage = {1, 2, 5, 6}
if(isInArray(beds, itemEx.itemid)) and isInArray(knight, getPlayerVocation(cid)) == TRUE then -- sword
doCreatureSetStorage(cid, 62669, SKILL_SWORD)
elseif(isInArray(beds, itemEx.itemid)) and isInArray(mage, getPlayerVocation(cid)) == TRUE then -- mlvl
doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL)
elseif(isInArray(beds, itemEx.itemid)) and isInArray(pally, getPlayerVocation(cid)) == TRUE then -- distannce
doCreatureSetStorage(cid, 62669, SKILL_DISTANCE)
end
doRemoveCreature(cid)
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(item.itemid == 1754) then -- sword
doCreatureSetStorage(cid, 62669, SKILL_SWORD)
elseif(getPlayerVocation(cid) == 4) then
if(item.itemid == 1754) then -- axe
elseif(getPlayerVocation(cid) == 4) then
doCreatureSetStorage(cid, 62669, SKILL_AXE)
end
if(item.itemid == 1754) then -- mlvl
elseif (getPlayerVocation(cid) == 1) then
end
doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL)
if(item.itemid == 1754) then -- mlvl
elseif (getPlayerVocation(cid) == 2) then
end
doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL)
if(item.itemid == 1754) then -- club
elseif(getPlayerVocation(cid) == 4)then
end
doCreatureSetStorage(cid, 62669, SKILL_CLUB)
if(item.itemid == 1754) then -- distannce
elseif(getPlayerVocation(cid) == 3) then
doCreatureSetStorage(cid, 62669, SKILL_DISTANCE)
end
if item.actionid == 1000 then
doRemoveCreature(cid)
end
end
return true
end
my script dont works :s
BUT YOUR SCRIPT WORKS
I FORGOT TO REGISTER MY IDS, SO MY DIDN'T WORK, BUT I WILL USE YOUR SAME, THANK YOU VERY MUCH, IT HAS ONE THING, IT DOES NOT APPEAR THE TIME MESSAGE THAT TRAINED AND HOW MUCH THE SKILL WAS CHANGED AND ETC ... I WANT TO SEARCH SOMETHING ABOUT. THANKS!!! YOU'RE BEST GUY