Jump to content

fusqueta

Members
  • Posts

    32
  • Joined

  • Last visited

Community Answers

  1. fusqueta's post in prevent to unequip item was marked as the answer   
    I made it by source, it's ugly but works fine

     
    bool pc_unequipitem(struct map_session_data *sd, int n, int flag) { ...     if (sd->inventory_data[n]->nameid == 2220 && !(flag & 2))     {         clif_unequipitemack(sd, n, 0, 0);         return false;     }  
  2. fusqueta's post in How to execute a simple query in source was marked as the answer   
    I created a function on log.cpp that already have all mysql pre-configs needed
     

     
    void log_death(int charid, int16 m, int16 killertype, int killerid, int lasthit) { StringBuf_Init(&buf);     StringBuf_Printf(&buf, "%s INTO `%s` ( `map`, `time`)", LOG_QUERY, "death_log");     StringBuf_Printf(&buf, "values ('%s',NOW() )", map_getmapdata(m)->name[0] ? map_getmapdata(m)->name : "");     if (SQL_SUCCESS != SqlStmt_PrepareStr(stmt, StringBuf_Value(&buf)) || SQL_SUCCESS != SqlStmt_Execute(stmt))         SqlStmt_ShowDebug(stmt); }  
×
×
  • Create New...