Jump to content

WordsUp

Members
  • Posts

    24
  • Joined

  • Last visited

Posts posted by WordsUp

  1. char_id is a integer i guess it should be @exist

    guild_id is a integer i guess it should be @GDExist

    I guess your insert command must be like this

    query_sql "INSERT INTO `woe_guild_breaks` (`castle_id`, `guild_id`, `id`) VALUES ('15',"+getcharid(2)+",1)";

    [/code]

    the query_sql works fine it saves into my sql correctly.

    the char_id and guild_id i didn't understand sorry.

  2. I have created this code for my server and inserted it on my agit_template.txt file but the problem is everytime the emp is broken it didn't return

    query_sql "SELECT `char_id` FROM `char` WHERE `char_id` = '"+getcharid(0)+"'",@exist$;
    if (getarraysize(@exist$) != 0){
    query_sql "UPDATE `char` SET `empbreak` = `empbreak` + '1' WHERE `char_id` = '"+getcharid(0)+"'";
    end;
    } 
    
    
    query_sql "SELECT `guild_id` FROM `woe_guild_breaks` WHERE `guild_id` = '"+getcharid(2)+"'",@GDExist$;
    if (getarraysize(@GDExist$) != 0){
    query_sql "UPDATE `woe_guild_breaks` SET `id` = `id` + '1' WHERE `guild_id` = '"+getcharid(2)+"'";
    } else {
    query_sql "INSERT INTO `woe_guild_breaks` (`castle_id`, `guild_id`, `id`) VALUES ('15','"+getcharid(2)+"','1')";
    end;
    }

  3. A simple script which allow player to gain item using this npc in exchange of event ticket (you can change if you want)

    Npc give a random item from the list.

    Players can exchange it using Event ticket

    this work one time per day you can change it in what you want. find OnHour24: and change it to what you want. OnHour24 is 12:00AM

    you can check the script for more details.

    i want to make it 3 random item every roll but i don't know how hahaha.

    roll machine.txt

    roll machine(24hours).txt

  4. is this code correct?

    - script sql -1,{

    OnAgitBreak:

    if (query_sql("select `guild_id` from `woe_record` where `guild_id` = '"+getcharid(2)+"'",.@ignore)) {

    query_sql("update `woe_record` set `id` = `id`+1 where `guild_id` = '"+getcharid(2)+"'",.@ignore);

    }

    OnAgitEnd :

    if (query_sql("select `guild_id` from `woe_record` where `guild_id` = '"+getcharid(2)+"'",.@ignore)) {

    query_sql("update `woe_record` set `castle_id` = '"+getcastlename(2)+"' where `guild_id` = '"+getcharid(2)+"'",.@ignore);

    }

    i don't know what .@ignore use i just copy that code somewhere in my files.

    }

  5. well at my description it says that you need an amount of item to get/exchange that to your chosen item.

    for example you get Valkyrie helm and wants it. you need 50PODS before you get it.

    and PODS can only get into an event or something.

    Plus disable trade of POD to insure that this will not be abuse.

  6. i just have this idea last night and still figuring out how can i do this.

    here is how it works

    Everyday gives an account a 1 roll opportunity

    Every Roll gives you a chance to obtain 3 random items (from the list you give)

    Each item have an specific amount for you to have it. (ex. you have on your list a "Vhelm, Varmor,Vshoes" cost : 10pod,25pod,15pod)

    you can only exchange one item at a time then if you have exchange an item you need to wait another day for you to have a roll again.

    Example interface

    [Daily Exchanger]

    You have 1 Roll for this day

    do you want to roll it?

    Menu : Yes , No! not yet

    if yes :

    [Daily Exchanger]

    Are you sure?

    Menu :Yes, I change my mind

    if yes :

    [Daily Exchanger]

    Rolling........

    next;

    [Daily Exchanger]

    You have this 3 item to choose

    which item you like to trade

    remember if you click it we will not

    give you another chance if you don't like it.

    Menu : Item 1(Amount), Item 3(Amount), Item 3(Amount)

    [Daily Exchanger]

    Here's your item

    Thanks see you tomorrow

    close;

    Thanks in advance to someone who will help me with this script :D

×
×
  • Create New...