sync_outfit.lua

main 51 lines · 1.7 KB Raw
Alex Alex Commit Initial commit 01/10/2026 09:20
1local creatureevent = CreatureEvent("SincOutfit")
2
3-- Sync outfits that player own with Znote AAC
4-- So its possible to see which full sets player
5-- has in characterprofile.php
6
7znote_outfit_list = {
8 { -- Female outfits
9 136, 137, 138, 139, 140, 141, 142, 147, 148,
10 149, 150, 155, 156, 157, 158, 252, 269, 270,
11 279, 288, 324, 329, 336, 366, 431, 433, 464,
12 466, 471, 513, 514, 542, 575, 578, 618, 620,
13 632, 635, 636, 664, 666, 683, 694, 696, 698,
14 724, 732, 745, 749, 759, 845, 852, 874, 885,
15 900, 973, 975, 1020, 1024, 1043, 1050, 1057,
16 1070, 1095, 1103, 1128, 1147, 1162, 1174,
17 1187, 1203, 1205, 1207, 1211, 1246, 1244,
18 1252, 1271, 1280, 1283, 1289, 1293, 1332
19 },
20 { -- Male outfits
21 128, 129, 130, 131, 132, 133, 134, 143, 144,
22 145, 146, 151, 152, 153, 154, 251, 268, 273,
23 278, 289, 325, 328, 335, 367, 430, 432, 463,
24 465, 472, 512, 516, 541, 574, 577, 610, 619,
25 633, 634, 637, 665, 667, 684, 695, 697, 699,
26 725, 733, 746, 750, 760, 846, 853, 873, 884,
27 899, 908, 931, 955, 957, 962, 964, 966, 968,
28 970, 972, 974, 1021, 1023, 1042, 1051, 1056,
29 1069, 1094, 1102, 1127, 1146, 1161, 1173,
30 1186, 1202, 1204, 1206, 1210, 1245, 1243,
31 1251, 1270, 1279, 1282, 1288, 1292, 1331
32 }
33}
34
35function creatureevent.onLogin(player)
36 -- storage_value + 1000 storages (highest outfit id) must not be used in other script.
37 -- Must be identical to Znote AAC config.php: $config['EQ_shower'] -> storage_value
38 local storage_value = 10000
39 -- Loop through outfits
40 for _, outfit in pairs(znote_outfit_list[player:getSex() + 1]) do
41 if player:hasOutfit(outfit,3) then
42 if player:getStorageValue(storage_value + outfit) ~= 3 then
43 player:setStorageValue(storage_value + outfit, 3)
44 end
45 end
46 end
47 return true
48end
49
50creatureevent:register()
51
Top