amosth
-
Posts
163 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by amosth
-
-
-
18 hours ago, Syreldar said:
quest ok begin state start begin when info or button begin say("blablabla") if (select("bla si", "bla no") == 1) then local _, query = mysql_direct_query(string.format("SELECT ok FROM account.account WHERE id = %d LIMIT 1;", pc.get_account_id())); say(string.format("value: %d;", query[1].ok)) end -- if end -- when end -- state end -- quest
make sure your 'ok' column only accepts "int" as value types.
Thanks man
if (select("bla si", "bla no") == 1) then local a_, query = mysql_direct_query(string.format("SELECT ok FROM account.account WHERE id = %d LIMIT 1;", pc.get_account_id())); if a_== id then say("ok") else say("no") end --say(string.format("value: %d;", query[1].ok)) end -- if
one last question, how do I check 2 column in the same result?
Example:
if (select("bla si", "bla no") == 1) then local a_, query = mysql_direct_query(string.format("SELECT ok,life FROM account.account WHERE id = %d LIMIT 1;", pc.get_account_id())); if a_== id then say("ok") else say("no") end end -- if
EDIT: Is not working =/
if (select("bla si", "bla no") == 1) then local a_, query = mysql_direct_query(string.format("SELECT ok FROM account.account WHERE id = %d LIMIT 1;", pc.get_account_id())); if a_== id then say("ok") else say("no") end --say(string.format("value: %d;", query[1].ok)) end -- if
-
11 hours ago, Chyu ^^ said:
Well actually I still can't manage connection with database via packets.
So can you help me with the quest?
-
9 hours ago, Chyu ^^ said:
This is really usefull if you are newbie into a development. But be aware of possible SQL injection (not this case). It is better to do this within a packets system.
I'll look into this. Could you help me with this case?
-
Hello friends,
I have created a column called "ok" in account, now I need to click on npc to check this example column:
column "ok" = 0
if the value of the "ok" column is 0 goes from the error message, if the value of the "ok" column is 1 of the correct message.
I hope you could understand.
Thank you for the attention.
when info or button begin say("blablabla") local f = select("bla si","bla no") if f == 1 then local c,query = mysql_direct_query("SELECT * FROM account.account WHERE id = '"..pc.get_account_id().."' LIMIT 1;") if query[1].ok < 1 then say'existe un valor menor a 1' else say'existe un valor de 1' end end if f == 2 then return end end
not work =/
-
-
-
I have a column and in that column I need to check 0 or 1,
column "verify" 0 or 1
quest testserver begin state start begin state start begin when login or begin set_state( gotoinfomation ) end end state gotoinfomation begin when letter begin send_letter("Welcome") end when button or info begin say("text") say("") local f = select("Yes count","No count") if f == 1 then local res1, verify = mysql_direct_query("select * from account.account;") mysql_direct_query("SELECT verify FROM account.account WHERE verify = '0'") else say("text2") if f == 2 then return end --set_state( gototeacher ) --end end end end end
-
This is not professional.
Thanks.
-
all channels lead DC?
-
1 hour ago, Chyu ^^ said:
But nobody can understand you. ¯\_(ツ)_/¯
lol?
the script is self explanatory:
1º quest:
command("shutdown")
when shutdown1.timer begin notice_all("Atenção !!!") notice_all("Manutenção: O servidor será desligado em 10 minutos!") notice_all("Efetue logout para evitar que itens sejam perdidos!") timer("shutdown2", 60*5) end when shutdown2.timer begin notice_all("Atenção !!!") notice_all("Manutenção: O servidor será desligado em 5 minutos!") notice_all("Efetue logout para evitar que itens sejam perdidos!") timer("shutdown3", 60*3) end when shutdown3.timer begin notice_all("Atenção !!!") notice_all("Manutenção: O servidor será desligado em 2 minutos!") notice_all("Efetue logout para evitar que itens sejam perdidos!") timer("shutdown4", 60) end when shutdown4.timer begin notice_all("Atenção !!!") notice_all("Manutenção: O servidor será desligado em 1 minuto!") notice_all("Efetue logout para evitar que itens sejam perdidos!") timer("shutdown5", 30) end when shutdown5.timer begin notice_all("Atenção !!!") notice_all("Manutenção: O servidor será desligado em 30 segundos!") notice_all("Efetue logout para evitar que itens sejam perdidos!") timer("shutdown6", 15) end when shutdown6.timer begin notice_all("Atenção !!!") notice_all("Manutenção: O servidor será desligado em 15 segundos!") notice_all("Para mais informações acesse: www.metin2.org") timer("shutdown7", 5) end when shutdown7.timer begin command("shutdown") end
2º text in login server:
""SHUTDOWN" : localeInfo.LOGIN_FAILURE_SHUTDOWN,"
MAINTENANCE
I need GMs not turned off.
-
3 hours ago, charparodar said:
Then what you need is a maintenance system...
VegaS has one for sell, I don't think you can find it for free (unbugged on the internet)
I need what I said above.
-
On 7/24/2018 at 7:55 PM, arves100 said:
I haven't test it, resport something...
sorry google translate That's not what I meant.=/ (
It's not the "dc" command I need but "shutdown"
Example in quest
command("shutdown")
Python:
""SHUTDOWN" : localeInfo.LOGIN_FAILURE_SHUTDOWN,"
-
On 7/24/2018 at 9:19 AM, arves100 said:
I guess he needs this:
File cmd_gm.cpp:
class discall_func
{
public:
discall_func() {}
void operator () (LPDESC d)
{
if (!d->GetCharacter())
return;
if (d->GetCharacter()->IsGM())
return;
DESC_MANAGER::instance().DestroyDesc(d);
}
};ACMD(do_disconnect_all)
{
const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet();
discall_func func;std::for_each(c_ref_set.begin(), c_ref_set.end(), func);
}cmd.cpp
ACMD(do_disconnect_all);
and
{ "dcall", do_disconnect_all, 0, POS_DEAD, GM_IMPLEMENTOR },
COMMAND: /dcall only Implementor
I'll test and tell if it worked
- 1
-
I would like to use the "shutdown" command but GMs should not be turned off.
GMs Must Stay Connected and Not Shut Down.
Can you help me?
-
-
How can I by a status wait until the e-mail is confirmed, ie .. will only be able to log in when confirming the e-mail?
-
-
Hi friends
block the use of the safebox on the map?
-
1 minute ago, Weles said:
No no, item proto any id and wearflag always this same (128)
thanks man
-
3 hours ago, Weles said:
Hey you need to do the tutorial again just changing the name, e.g. "IsWELESRing1" to "IsWELESRing2"
item_proto and the calculation of wearflag to IsWELESRing2?
-
How do I add multiple items and different effects?
-
10 hours ago, WeedHex said:
from python, need to use Bip01
I'm using
chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+21, "Bip01", "D:/ymir work/pc/common/effect/armor/roxo.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+22, "Bip01", "D:/ymir work/pc/common/effect/armor/vermelho.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+23, "Bip01", "D:/ymir work/pc/common/effect/armor/verde.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+24, "Bip01", "D:/ymir work/pc/common/effect/armor/marron.mse") chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+25, "Bip01", "D:/ymir work/pc/common/effect/armor/azul.mse")
-
Hi
Can you help me with this script?
case CItemData::ITEM_TYPE_COSTUME: if (refine < 7) return 0; if (pItem->GetSubType() == CItemData::COSTUME_BODY) { __ClearArmorRefineEffect(); m_armorRefineEffect = EFFECT_REFINED+EFFECT_BODYARMOR_REFINED7+refine-7; __AttachEffect(m_armorRefineEffect); } break;
Error: https://metin2.download/picture/oni18S6FMpFKN50vbLG2ddOse3S7oXN1/.gif
Change percent regen HP elixir Helong (S)
in Community Support - Questions & Answers
Posted
Hi,
How do I change the regeneration percentage of the elixir item?
Bênção de Helong (S) > Change percent hp to instant hp
Example item 70020