This is an example of the check if the clan leader has enough SP
Code:
push_event // talker
push_const 40
add
fetch_i // sp
push_const 288
add
fetch_i4
push_const 7500
greater_equal
Example fo delete X SP (7500 in this case, as my server is x4 that makes 30000SP taken in reality)
Code:
push_event // talker
push_const 40
add
fetch_i
push_const 1
push_const 7500
negate
All you have to do is search for similar SP request in 'class 1 guild_master : citizen', in 'handler 48 483 // LEVEL_UP_PLEDGE'