Hi how can i add starting items and starting zulie ? im using evo revision 4
Hi how can i add starting items and starting zulie ? im using evo revision 4
new characters are created in the charserver
CharPackets.cpp
bool CCharServer::pakCreateChar( CCharClient* thisclient, CPacket* P )
Look for the part that looks something like this
it might look a bit different in DR4 as this is taken from DR1.5 (drop-rev) which is the one I currently have open in my code editor.Code:if(!DB->QExecute("INSERT INTO characters (account_name, char_name, face, hairStyle, sex) VALUES('%s','%s',%i,%i,%i)", thisclient->username, newname.c_str(), face, hairstyle, sex)) return false; unsigned int mid = (unsigned)mysql_insert_id( DB->Mysql ); MYSQL_ROW row; if(!DB->QExecute("INSERT INTO items VALUES(%i,29,3,0,40,100,3,1,0,0,0,0,0)", mid)) return false; if(!DB->QExecute("INSERT INTO items VALUES(%i,29,5,0,40,100,6,1,0,0,0,0,0)", mid)) return false; if(!DB->QExecute("INSERT INTO items VALUES(%i,1,8,0,40,100,7,1,0,0,0,0,0)", mid)) return false; if(sex==0) { if(!DB->QExecute("INSERT INTO items VALUES(%i,222,2,0,40,100,12,1,0,0,0,0,0)", mid)) return false; } else { if(!DB->QExecute("INSERT INTO items VALUES(%i,221,2,0,40,100,12,1,0,0,0,0,0)", mid)) return false; }
Either way the principle is the same. this code inserts values into your new character in the database so just modify it to add whatever you like
@Purpleyouko Help please
here is the code
Code:if(!DB->QExecute("INSERT INTO characters (account_name, char_name, face, hairStyle, sex, hairColor) VALUES('%s','%s',%i,%i,%i, %i)", thisclient->username, name.c_str(), face, hairstyle, sex, haircolor)) return false; unsigned int mid = (unsigned)mysql_insert_id( DB->Mysql ); for(int i=0; i<ItemNewChar.size();i++) { if(ItemNewChar[i]->sex == 2 || ItemNewChar[i]->sex == sex) { if(ItemNewChar[i]->premium == true && thisclient->premium == false) continue; if(!DB->QExecute("INSERT INTO items VALUES(%i,29,3,0,40,100,3,1,0,0,0,0,0)", mid)) return false; if(!DB->QExecute("INSERT INTO items VALUES(%i,29,5,0,40,100,6,1,0,0,0,0,0)", mid)) return false; if(!DB->QExecute("INSERT INTO items VALUES(%i,1,8,0,40,100,7,1,0,0,0,0,0)", mid)) return false; if(sex==0) { if(!DB->QExecute("INSERT INTO items VALUES(%i,222,2,0,40,100,12,1,0,0,0,0,0)", mid)) return false; } else { if(!DB->QExecute("INSERT INTO items VALUES(%i,221,2,0,40,100,12,1,0,0,0,0,0)", mid)) return false; }
so what is it that you want to know?
FATAL Error cannot create char when i put this code what seems the error?
you didn't just paste my code in did you?
You are supposed to find where that code exists in your own source then change the values in the queries to put in the items that you want