i dont get it...By edit, I mean adding an elf outfit, for example. If the source needs to be edited, which file should I look for?
Monster but with a possibility to edit colours.i dont get it...
elf outfit like - custom
or as monster look like?
if monster - you edit that in database - looktype
elf - 62
elf arcanist - 63
elf scout - 64
monsters outfit cannot be edited - You have to add it by yourself, as a new oneMonster but with a possibility to edit colours.
hey bro you found how to make it work for all except the bank?Exactly, but I still haven't found a way to do that.
All of the bank code is on a single file: gen-bank.ndb
this one i meantThe problem itself it's the dialog, you can't check for currency when you talk to npc like that:
The only workaround I can imagine is to use something different on bank npc than %1:
But I'm stucked now.Code:Topic=91,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your gold coins to %P platinum coins for you?", Topic=96
You have to rise amount on cpp file, and compile again. I donr remember now, but look in whole project for "500"hey bro you found how to make it work for all except the bank?
Post automatically merged:
this one i meant
You have to rise amount on cpp file, and compile again. I donr remember now, but look in whole project for "500"
did u get it? im trying to do this for monthsHello guys. Is there a bank system for this server? To withdraw, deposit and transfer gold coin?
FullDigit,%1,0<%1,Topic=205 -> Amount=%1, "So you would like to transfer %A gold coins to whom?", Topic=206
FullDigit,"transfer",%1,0<%1 -> *
GetString,Topic=206,Guid=PlayerExists -> "You cannot transfer gold to yourself."
GetString,Topic=206,PlayerExists=0 -> "A player with this name does not exist."
GetString,Topic=206,PlayerExists>=1 -> "So you would like me to transfer %A gold coins to %S, is this correct?", Topic=207
Topic=207 -> "Maybe some other time."
"yes",Topic=207,Balance>=Amount -> "You have transferred %A gold coins to %S.", Transfer(Amount)
Outfit color elf is id 144 and dwarf is 160By edit, I mean adding an elf outfit, for example. If the source needs to be edited, which file should I look for?
COMBAT_PARAM_DISPEL
Anyone out there having a problem with Exana pox? When walking 100% it doesn't remove the poison, and when stopped it has a small chance of failing.
Post automatically merged:
Outfit color elf is id 144 and dwarf is 160
creature:removeCondition(CONDITION_POISON)
function onCastSpell(creature, variant)
thank you very much, that worked.Add
Lua:creature:removeCondition(CONDITION_POISON)
Tofor antidote spell and runeLua:function onCastSpell(creature, variant)
How do i get the npc to charge me 3 items in the quality of each one? example:Please, refrain from making multiple words inside the same inverted commas, rather use: "bring","me","to","thais" instead, another detail, make sure to set Price inside the conditions instead of the actions, the CountMoney function is not going to check any money because the variable is not assigned prior to this function call.
You can use the function
Ruby:CreateContainer(CONTAINER_ID, ITEM_ID, DATA)
Just place it along side the actions within the NPC behavior structure, example:
Ruby:"backpack" -> CreateContainer(1988,2006,10), "Here you are!"
Topic=2,"yes", Count(1231)>=10, Count(1232)>=7, Count(1233)>=2 -> "Here. I hope that's it now.", Amount=10, Delete(1231), Amount=7, Delete(1232), Amount=2, Delete(1234), Type=3370, Amount=1, Create(Type)
C++:
Replace with something like
C++:
it didnt work for me :/I think you will need to do this in sources.
Specifically, look for
C++:bool ConjureSpell::conjureItem(Creature* creature) const
Under
C++:bool foundReagent = false;
Remove
C++:Item* item = player->getInventoryItem(CONST_SLOT_LEFT); if (item && item->getID() == reagentId) { foundReagent = true; // left arm conjure int32_t index = player->getThingIndex(item); g_game.internalRemoveItem(item); Item* newItem = Item::CreateItem(conjureId, conjureCount); if (!newItem) { return false; } ReturnValue ret = g_game.internalAddItem(player, newItem, index); if (ret != RETURNVALUE_NOERROR) { delete newItem; return false; } g_game.startDecay(newItem); Spell::postCastSpell(player, conjureCost, soulCost); } item = player->getInventoryItem(CONST_SLOT_RIGHT); if (item && item->getID() == reagentId && player->getMana() >= conjureCost) { foundReagent = true; // right arm conjure int32_t index = player->getThingIndex(item); g_game.internalRemoveItem(item); Item* newItem = Item::CreateItem(conjureId, conjureCount); if (!newItem) { return false; } ReturnValue ret = g_game.internalAddItem(player, newItem, index); if (ret != RETURNVALUE_NOERROR) { delete newItem; return false; } g_game.startDecay(newItem); Spell::postCastSpell(player, conjureCost, soulCost); }
Replace with something like
C++:int32_t itemCount = player->getItemTypeCount(reagentId); int32_t subdata = -1; uint32_t conjureItem = conjureId; uint32_t newCount = conjureCount; if (itemCount && itemCount >= 1 && player->getMana() >= conjureCost) { foundReagent = true; if (player->removeItemOfType(reagentId, 1, subdata)) { Item* newItem = Item::CreateItem(conjureItem, newCount); if (!newItem) { return false; } ReturnValue ret = g_game.internalPlayerAddItem(player, newItem); if (ret != RETURNVALUE_NOERROR) { delete newItem; return false; } g_game.startDecay(newItem); Spell::postCastSpell(player, conjureCost, soulCost); } }
Probably don't need to to do the new conjure count part, this is just my code, but ive ripped out some custom changes for prem players conjuring more charges. I'm just too tired atm to clean this up any further.
testing it.. very nice project!
i will try drowngrade it for 7.4..
i will need to remove selling wands, rods and runes from npcs, cast spells souls and levels,.. anythin
it didnt work for me :/
with it nor puting in the hand.
help? how do rune without put it on hands
yes.. its online, i'm editing some details.. i will take off wands and rods, put spells without souls, and i will try to put stamina afterdid you compile it?
Open iologindata.cpp, and the function to save player, you have to cast sex as an actual sex.Does anyone know how to fix that?
// Load player function
player->setSex(static_cast<PlayerSex_t>(result->getNumber<uint16_t>("sex")));
// Save player function
query << "`sex` = " << static_cast<uint16_t>(player->sex) << ',';