Jump to content

Elzza

Member
  • Posts

    19
  • Joined

  • Last visited

  • Feedback

    0%

About Elzza

Informations

  • Gender
    Male

Recent Profile Visitors

496 profile views

Elzza's Achievements

Explorer

Explorer (4/16)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Is it possible to move characters to my new arena, using duel arena? how to do it? How do I use this function? Pls, give me sample quest or corrected function
  2. In my full code, I've done it earlier, but error is still. edited code: test.h class test { public: int global_var[3]; // Global Variable test(); void write(int nmb); int read(); }; extern test testt; test.cpp #include "test.h" ... test::test() { global_var[0] = 0; global_var[1] = 0; global_var[2] = 0; } void test::write(int nmb) { global_var[0] = nmb; } int test::read() { return global_var[0]; } I did it because I want to use only one class object in different functions. How can I do it differently?
  3. I wrote a function that uses a global variable, but this variable isn't working properly. A function that reads / records the number to this variable, not always doing it properly, why? test.h int global_var[3]; // Global Variable class test { public: void write(int nmb); int read(); }; extern test testt; test.cpp #include "test.h" ... void test::write(int nmb) { global_var[0] = nmb; } int test::read() { return global_var[0]; } questlua_pc.cpp ... #include "test.h" ... test testt; int pc_test_func_write(lua_State* L) { testt.write(lua_tonumber(L,1)); return 1; } int pc_test_func_read(lua_State* L) { lua_pushnumber(L, testt.read()); return 1; } ... {"test_func_write", pc_test_func_write }, {"test_func_read", pc_test_func_read }, This is a sample code. How can I fix it?
  4. 1.Could somebody tell me how to create a new function, which will verify when the player is dead? In quest could look like this: while pc.dead begin Or only using lua.
  5. I wrote a code which should send the number to lua (quest), but something is wrong. This code isn't sending number to lua, why? Plik questlua_pc.cpp: ... int pc_my_func(lua_State* L) { ... lua_pushnumber(L, 0); return 0; ... } ... and quest test.quest: quest test begin state start begin when blacksmith.chat."test" begin say("test") local var = pc.my_func() say(var) end end end
  6. When players are fighting, they can't use the potions, like red, blue etc. I want give them prohibit the use of potions.
  7. How to set a ban on the use of potions? And second question: How to remove player party? Of course, using c++.
  8. I have problem, my code isn't reading properly data from MySQL, type: smallint. There is number: 64, but this function show me number: 54. I don't know what is wrong. My code: short MyFunction() { ... std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery("SELECT coins FROM player.itemshop WHERE name='%s';", pCharName)); MYSQL_ROW row_coins = mysql_fetch_row(msg->Get()->pSQLResult); return row_coints[0][0]; }
  9. You can add new tables in MySQL, like: id_account | id_item | item_count | attr_type1 | attr_value | ... | attr_value6 | socket1 | socket2 | ... | socket5 And add new quest function which will add new data to your tables and delete old item from game or use only quest. Write quest and it's all
  10. Yea, I should use pc.myfunction but "CPVPManager::instance().Insert()" isn't starting pvp but giving invitation to fight. Hm?
  11. It's not work. #edit I have to do somewere mistake, because my code looks like this: int pc_start_pvp(lua_State* L) { LPCHARACTER pChar1 = CQuestManager::instance().GetCurrentCharacterPtr(); //DWORD pid1 = pChar1->GetPlayerID(); LPCHARACTER pChar2 = CHARACTER_MANAGER::instance().FindPC(lua_tostring(L,1)); //DWORD pid2 = pChar2->GetPlayerID; if ( pChar1 == NULL || pChar2 == NULL ) { //lua_pushnumber(L, 0); return 0; } CPVPManager::instance().Insert(pChar1, pChar2); pChar1->ChatPacket(CHAT_TYPE_INFO, "It's not work1!"); pChar2->ChatPacket(CHAT_TYPE_INFO, "It's not work2!"); return 1; } 1. I include: "#include "pvp.h" and add: "{ "start_pvp", pc_start_pvp }," to "void RegisterPCFunctionTable()". 2. I was add this: "start_pvp()" in "quest_funcitons" and I was create quest: quest pvp begin state start begin when blacksmith.chat."test_pvp" begin say("Nick") local nick= input() start_pvp(nick) say("done!") end end end But when I wirte nick, nothing happened.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.